You don't need to believe in an optimistic future to be invested in it. Instead, you sound stuck because you're trapped in a prediction of one maximally pessimistic future. But maybe you can find investment in a less pessimistic, yet still rough and tough future. Basically, move closer from doomer toward prepper. While we all still die if we happen to be in the worst timeline, you can come out ahead if we happen to be in the other not as bad timelines.
Pessimistic temperaments do feel useless during times of plenty. But my metaphor for them is humanity's "soil seed bank"; nature's backup plan for forest fires. All the full grown oaks laugh at those buried acorns that stay underground until they rot. In a timeline without forest fires, those acorns sure look dumb. But if you step back and look at all the possibilities, you can see those timelines where those acorns had their moment and repopulated after a catastrophe. Their value can only really be appreciated from a theoretical perspective, or god's eye view.