If you have society based on self-interest of individuals, then people will only help you when they need you and they will abandon you when they no longer need you.
It seems that such mindset brings some problems along with benefits. One problem are "social outcasts", which are the result of society abandoning individuals due to a lack of need for those individuals.
Individuals who are not needed by society end up having no friends or companions. In other words, they become "social outcasts".
Therefore, if "social outcasts" are a guaranteed result of a capitalist mindset, and the mental illnesses are a guaranteed result of "social outcasts", it follows that mental illnesses are a guaranteed result of the capitalist mindset.