Being optimistic does not necessarily mean being happy all the time.
It is about overcoming what the world throws at you and being able to say "I am still standing despite what was thrown at me."
Do not let circumstances defeat you. You can, if you think you can.