Psychologists have been using a simple test -- the Life Orientation Test -- for years to find out. The same test has been featured in most of the research done on the relationship between optimism and pessimism and (mental) health.
I used to lament not being able to follow my dreams. But hey, I had to work. I had a house to pay for. I had two car notes. I had a wife to support. I had it all. Except happiness. I look back on it now, and I know that I had no idea how miserable a person I really was back then.
Cultivate your realistic optimism by combining a positive attitude with an honest assessment of the challenges that await you. Don't visualize success -- visualize the steps you will take in order to make success happen.
Pessimism can be bad for your health, and it could lead to heart disease and strokes. You may not be able turn to yourself into a whistling, wide-eyed optimist, but it is worth the effort to shed yourself of cynical hostility.