The defining characteristic of pessimists is that they tend to believe bad events will last a long time, will undermine everything they do, and are their own fault.
Optimism is a strategy for making a better future. Because unless you believe that the future can be better, you are unlikely to step up and take responsibility for making it so.