Learned optimism is the idea in positive psychology that a talent for joy, like any other, can be cultivated. It is contrasted with learned helplessness. Learning optimism is done by consciously challenging any negative self talk.
 -- Wiki