According to some definitions, all who are not enlightened are mentally ill to some extent. Anyone who is subject to birth is also subject to disease.
Nevertheless, there are some obstructions to ordination. Some individuals should not be ordained — if they are ordained their ordination is invalid and they should be expelled. Others should not be ordained, but if they are, their ordination is valid, but the monks who ordained them are at fault.
Read Ajahn Thanissaro's chapter on Ordination
for details. There is no need to repeat it all here.