I have for most of my life attempted to live by a philosophy I call “constructive pessimism”, originally inspired by a (very) long-ago essay by (IIRC) Robert Benchley I saw in a Fifties Readers Digest.
Glum people aren’t pessimists; they are disappointed optimists. A true pessimist goes around with a smile on his face and a spring in his step, because, having convinced himself that the worst is inevitable, nothing ever disappoints him and all his surprises are happy ones. The old saw about the half-empty/half-full glass is a canard. A genuine pessimist looks at the glass and says with pleasantly surprised delight, “Hey, great! There’s some beer!”
It is, admittedly, not always possible to fully live up to that, but the same is true of any philosophy, I reckon.
Lois McMaster Bujold, the science fiction writer, added the capstone to the philosophy when one of her characters remarked, “All is well, and if it’s not, at least we’re one day closer to our God.” I’d never managed to put it into words before. If, regardless of what happens, it’s still one step closer to Heaven, it can’t be all bad, now can it?
I commend the notion to you. You could die today; this is different from yesterday in what way, exactly? No reason to be glum about it. It’s just life, and in the meantime we can enjoy the happy occasions when, against all expectation, there’s some beer.
 Saint Umegat, in The Curse of Chalion, © 2001 by Lois McMaster Bujold (EOS, an imprint of HarperCollins Publishers). If you have a taste, or even tolerance, for science fiction and fantasy, the book cannot be recommended too highly.