During a study, researchers found that when subjects did a self affirmation exercise they were able to perform better in solving problems.
Self affirmation exercise would typically involve highlighting ones strengths, what is achieved so far and the talents we have as a way to build faith in our own abilities. Also a sense of gratitude for the achievements thus far can go a long way in enhancing optimism to meet the challenges in life.
"The present study provides the first evidence that self-affirmation can protect against the deleterious effects of stress on problem-solving performance. Specifically, we show that chronically stressed individuals have impaired problem-solving performance and that self-affirmation can boost problem-solving performance under pressure."
"The advantages are most pronounced when compared with a focus on hassles or complaints, yet are still apparent in comparison with simply reflecting the major events in one's life, on ways in which one believes one is better off than comparison with others, or with a control group."