I found this Scientific American article fascinating. Perhaps you will, too. It deals with one of the vexing problems of modern science: why do certain personality traits that manifest themselves in youth and seem so damaging to one?s health and vitality continue to show up consistently in the gene pool? It would seem that such traits must have survival value, but it often eludes explanation.

For depression, it seems, researchers are now presenting an intriguing theory as to why, despite its debilitating effects, it may well have survival value. The key point:

…[W]hen you are faced with a difficult problem, such as a math problem,
feeling depressed is often a useful response that may help you analyze
and solve it. For instance, in some of our research, we have found evidence that people who get more depressed while they are working on
complex problems in an intelligence test tend to score higher on the
test.

Analysis requires a lot of uninterrupted thought, and depression coordinates many changes in the body to help people analyze their
problems without getting distracted. In a region of the brain known as
the ventrolateral prefrontal cortex (VLPFC), neurons must fire
continuously for people to avoid being distracted. But this is very
energetically demanding for VLPFC neurons, just as a car?s engine eats
up fuel when going up a mountain road. Moreover, continuous firing can
cause neurons to break down, just as the car?s engine is more likely to
break down when stressed. Studies of depression in rats show that the
5HT1A receptor is involved in supplying neurons with the fuel they need
to fire, as well as preventing them from breaking down. These important
processes allow depressive rumination to continue uninterrupted with
minimal neuronal damage, which may explain why the 5HT1A receptor is so
evolutionarily important.

Many other symptoms of depression make sense in light of the idea
that analysis must be uninterrupted. The desire for social isolation,
for instance, helps the depressed person avoid situations that would
require thinking about other things. Similarly, the inability to derive
pleasure from sex or other activities prevents the depressed person
from engaging in activities that could distract him or her from the
problem. Even the loss of appetite often seen in depression could be
viewed as promoting analysis because chewing and other oral activity
interferes with the brain?s ability to process information.