Just about everyone who has ever undergone psychiatric care cannot ever get a medical. There is technically a process but it is extremely difficult and expensive.
Some conditions are uniformly disqualifying, for good reasons. But it results in a perverse situation where a regular person can choose to either get mental health care or fly, but not both.