Optimism and pessimism are mindsets and they are on a continuum. It is about the perspective we have on aspects of our lives. In some aspects, we tend to be more pessimistic (e.g. the project is far behind deadline), in others we tend to be more optimistic (e.g. we got that promotion).
The question is: Where is your home base?
Do you look forward to each new day wondering what you can contribute and learn? Or do you see it as a marathon through enemy territory?
By the way, the more optimistic you are the more confident you will be and optimism is a learnable skill! It is about the right mindset and mental tools.