Mental illness exists mostly due to controllable factors. Those who don't know of or understand these factors consider it a mystery that requires medical management. Medical management is legitimately required due to evidence of genetic or structural damage only. It is quite overused otherwise.
Here are many of the somewhat avoidable factors that result in mental illnesses:
(1) insufficient sleep
(2) insufficient physical activity
(3) serious infections
(4) excessive stress
(5) high BP
(6) high bad cholesterol
(7) insufficient omega-3s
(8) unhealthy processed food intake and/or SAD diet
(9) vitamin and mineral insufficiencies
(10) side effects of prescription drugs, not limited to PPIs and anticholinergics
(11) narcotic use or abuse
If you fix the above lifestyle factors, there would be far fewer cases of "mental illness".