Every so often I see the argument that psychological depression is common because it evolved for a purpose. Usually the idea is that depressive symptoms bring social benefits to the sufferer, as "honest signals" of mental hardship. Less commonly, I see other hypotheses, such as the idea that depression gives people a "breather" to work out their problems. I don't think any of these are convincing, because they don't demonstrate the fitness advantages of the behavior.
Jerry Coyne has written an essay that puts the problems into better words than I could:
The evolutionary calculus for depression—as for any psychological “adaptation”—demands an answer to this question: how does that condition affect your expected number of offspring? It is odd that evolutionary psychiatrists neither answer this question nor, with rare exceptions, consider it, especially because data on reproductive output are not hard to gather.
Clinically defined depression has substantial additive variation in human populations, so evolution is not irrelevant to explaining it. But it doesn't appear to increase fitness, or at least nobody has demonstrated that it does.
Coyne additionally discusses why an adaptive hypothesis needs to explain the persistence of additive variation. Directional selection is expected to reduce or eliminate additive variation, so additive variation implies non-directional selection, epistasis or other exceptional conditions. I would add one element to his discussion: Many human phenotypes have additive variation today that they may have lacked in the past, because adaptive evolution during the Holocene hasn't come to any kind of equilibrium. There hasn't been time for many genetic changes to be fixed. This explanation for the presence of additive variation doesn't imply that depression is adaptive; only that in the long run we can't expect it to have the same incidence as today.