The answer is Thoughts
Cognitive therapist believe that the emotion that we felt in our day to day live willl heavily influenced by the way we see/perceive everything that happen around us.
For example, people who percive failure as a challenge to get better would tend to feel excited and motivated to work harder after the failure. People who percieve failure as a final nail in the coffin will tend to lower their performance after hitting a failure.