Things don’t have to be ideal for you to have a positive and optimistic mindset. That also doesn’t mean that you have to be the poster child for positivity.
The reality is that fear and self-doubt sometimes creep in. That doesn’t mean that that is how you generally need to function.
It’s the general mindset that you have that matters most. It’s that attitude that will dictate your reality.
Make sure that you have the best mindset possible. It doesn’t have to be perfect. Just do your best.