There is, in fact, a very long list of mental health disorders that disqualify you from joining the military, and many of them will disqualify you from further service should you develop them while serving.