Which is why the optimal strategy is to be optimist most of the time, but fall into depressive mood when we encounter a lot of obstacles. Use that depressive time to assess your situation and then start changing it, fueled by your normal optimism.
The issue is, if the obstacles we encounter are too many then we remain in low mood for too long, and that state becomes permament. Early in human evolution, when we were all living at savanah all the dangers and obstacles were short-term. This is entirely different in civilized society.