Why doesn’t evolution eliminate mental illness?

I was reminded by a couple recent articles that mental illness, specifically psychosis and depression, must have significant survival value, or surely evolution would have rooted it out long ago. After all, these conditions often lead to risky behavior or suicide. Where’s the value in that?

The value is to the species, not to the individual. Male black widow spiders suffer from evolution’s ruthless disregard for the species at the expense of the individual, as do those who suffer from sickle cell anemia.

The articles that caught my eye were:

Tributes to the “Beautiful Mind” of John Nash,  such as this one by   Rachael Rettner at LiveScience.com  

which reminds us that psychosis, or “thinking outside the box”, has both good and bad sides.

The Nash tributes appears on the heels of a recent study Are Entrepreneurs “Touched by Fire” by Michael A Freedman

which highlights the (to me) more surprising association of depression with successful entrepreneurship. One mechanism that could explain this association is that depression results from or in an increased sensitivity to the needs of others, which entrepreneurs then proceed to do something about.