The Cognitive Appraisal Theory is the school of thought that proposes that specific types of thoughts can be linked to specific emotions. Our personal interpretation of a situation or event determines our emotions.
So, according to this happy thoughts lead to happy emotions and sad thoughts lead to sad emotions.