The issue with depression is I think this emotional signaling can be entirely miscalibrated, and sometimes, you do you have to figure out a way to override those signals.
This can happen anytime, and could since the times human life became more complicated than hunting and gathering and living in caves.
Negavive emotions (and physical pain) may be a warning, but I strongly wish I'd have more control over them. It reminds me of a typical scene from a naval or sci-fi movie, when something happens and there's an alarm siren blaring. The captain comes to bridge and asks some crewman to shut off the alarm sound. Because such a warning is useful until it's heard and understood, and then it's only seriously distracting. Much like negative emotions and physical pain.