Cognitive Behavioral Therapy uses the cognitive triangle to represent how thoughts, feelings and behaviors are interconnected and how each affects the others and how we can use that information to develop healthier habits.
The idea is to be able to redirect or influence your thought patterns, but it starts with being aware of what those thoughts are and understand what distortions might be present The premise is by changing one, you influence the others.
Basically a circumstance happens, it will trigger one of them such as a thought, that will then produce a feeling which ultimately results in your behavior and taking an action.
You can ask yourself some questions about the thoughts you notice you are having based on a situation. Is this thought accurate? Is this thought helpful? Is this thought necessary? Is there any evidence that supports this thought? Is there any evidence that does not support this thought?
You can be more mindful of the trigger and determine if it is necessary to replace the negative thought or uncomfortable feeling with a more helpful thought and change your reaction to the trigger.
The more you replace unhelpful or negative thoughts, the more your brain will stop going to those thoughts automatically and will start moving in a healthier direction and improve your emotional state.