“I lift my eyes to the mountains, from whence will come my help?
My help is from G‑d, who creates heaven and earth.”—Psalms 121:1-2.
People believe that only fools are optimists. But the opposite is true.
Precisely because we understand how desperate the situation really is, how helpless we are, and how impossible the challenge, that itself tells us that we cannot survive without the help of the One Above, the One who created all this universe from the beginning.
And it tells us how great a G‑d we have—a G‑d who can lift us high beyond the natural order and transform the most ominous darkness to brilliant good.
The greater a realist you are, the greater your optimism must be.

Optimism is from Latin optimus meaning best. Belief and reliance on Hashem means he will do the best for you tailored to your individual needs, as in the word optimal, not necessarily the ultimate. For instance, if I need X, he might supply X minus one or even Y because he knows your real needs.
And therefore with life's experience we can honestly say:
גם זו לטובה.
: