Examples may help you understand how to change from pessimism to optimism. Let's say you are worried about a problem at work and your stress causes you to feel anxious and depressed. The more you think about this problem, the more you worry about losing your job.