I've heard a few and am making some others up. I don't really read, but for people that like reading the internet could probably provide some actually scientific knowledge about this.
I'll also add that I don't believe that depression is a self-produced illness in the vast majority of cases.
1. The agricultural revolution and its consequences...
In a natural environment people would genuinely support and help someone that's not doing well, since everyone is needed (and people aren't really able to distract themselves from the other tribe members). I am speaking in general terms of course, as you will see. So, displaying that you have problems would actually be useful and you'd get real help (actually be given resources and manpower and shit; sounds crazy now, I know).
2. Weed 'em out, biological imperative.
We have a bunch of ways to signal to others that we're inferior genetic-environmentally, depression is one of them. If it comes down to some being prioritized due to limited resources or sexual partners ("limited" is subjective here), the depressed would go without. How many women would say they get turned on by a man with no willpower, rather than a con(fident) man? Who would be first to eat of the only kill in weeks? The depression will get the less adapted/genetically fortified to forego their own genetic interests, as well as help others take advantage with less risk. It will lead to the less adaptive genes+environments dying off more than if literally no one ever gave up on their genetic interests (bloodbaths for every food/mate shortage). Also, suicide.
3. In-group harmony.
To have some clown/joker in the group is stabilizing, as is having someone that everyone agrees is worse than the rest. Think wolves have this. Kings used to have the harlequins or whatever. Also, it's good for everyone to know who will be first to do a nasty, dangerous task or who is to go without food if there's a problem. Everyone can feel safer and feel better about themselves. The people at the bottom/excess but adaptive males (not that there would be much comparison to today's harem-feudalism) are less likely to rebel/walk out during hard times. Comedic relief, entertainment, punching bag--all-in-one for a low cost. For this to work well, the depression can't really be too severe. So, the depression will wear someone down to where they'll accept being worse off and lower status than everyone else.
"Ridi, Pagliaccio..."
4. Defense against suicide.
Heard this somewhere. As some here would know, it's hard to kill yourself on an empty stomach (fucking 8h garbage). No energy? No death. Especially if you're in a forest or savannah and don't even have ropes and shit.
5. Save energy.
Straightforward idea. Nothing much to gain in your current environment (no mates, no good food, no direction for the tribe)? Then don't run around and waste energy, sometimes waiting is the only move.
"Oh, I can sit at a desk for ten hours a day to just barely survive, and then die a virgin at 80? Let me just lower my caloric expenditure as much as possible by laying down and gaming. Wake me up when there's anything of value around me."
6. Stress-induced depression.
Getting burnt out by worrying/calculating too much. Felt I had to mention it. Obviously just that you need to rest up after long periods of this demanding state of mind. Chess players can burn like 7000 kcals during a tournament or some shit, mental activity can be very demanding physically.
7. Risk mitigation.
Let's say there's actually some stuff you want, but it's extremely dangerous. Then, it's (genetically) better to either get demotivated or stress yourself into depression, as to not get killed/eaten/poisoned/etc.
Feedback well cum.