I love Cognitive Behavioral therapy and I often use these techniques in my sessions. One of the first things I tend to introduce is the idea of how our thinking/feelings affect our behaviors. To understand why we did something, it can be helpful to take a step back at what caused it. In CBT that is the idea of the ABC model: (A) activating event, (B) belief, and (C) consequence. You can also think of it as the triggering event (something happened) => you had thoughts/feelings about what happened (these might get twisted around or bring up other feelings) => your behavior (you respond to what happened based on what you feel and think). For example, Toby was startled by a loud sound, he felt scared/overwhelmed/ashamed and thought that something bad had happened/that he was going to get hurt, so in response he started yelling and ran away to hide. Toby was later able to identify the loud sound as a trigger and begin to understand why this happened.
The first step to making a change is understanding what is going on. What are your triggers? What do those things make you feel/think? Don’t expect yourself to stop this pattern right now. Information gathering is a crucial first step. After things happens, reflect back on what was going on before/during/after. Recognize what the factors were to what happened (I was hungry, it reminded me of a bad situation from before, it was in front of someone I was trying to impress, etc). Once we start to figure out what your pattern is, we can make changes…. one step at a time.