Having an optimistic mindset as often as you can is important, not only for the psyche but also how you go about your life. It affects you in the long run.
When you have a positive mindset it changes a lot for you. For example, going into a job interview, a test, meeting someone for the first time, etc.. the type of energy you put out will either attract or repel the people around you. Most people enjoy being around others who lift them up, see the good side of things or are overall a joyous and/or happy person. Of course this doesn't apply to every minute of every day, but generally.
If you meet someone for the first time, getting to see someone when they're smiling and friendly is a very good feeling; it makes you lose your nerves and enjoy the conversation as it goes. Going for a job interview, not many people would probably hire an employee who clearly has confidence issues or sees the worst in everything. Showing what you are made of and being confident in your abilities, what you can do, is a very good asset to own and practice.
Aside from how your positivity affects other people, it also changes yourself and the way you think, in a better way. Even if you aren't the most upbeat and happy person, that doesn't mean you cannot be optimistic; "fake it till' you make it", as they say. When you teach yourself and make yourself say and think these positive things, you train your mindset to gear in that direction and help your mental health out immensely.
Being optimistic can be difficult at times, we all get upset, sad, depressed- that's part of what makes us human. But don't forget that we can have great moments, full of joy or just positivity if we try and practice. Optimism is also part of what makes us human.
(sorry for any grammar or spelling mistakes I may have made)