Research on avoiding thinking about things that trigger depression or anxiety Has there been study done in regards to the phenomenon of avoiding thinking about things that would emotionally trigger depression or anxiety?

What I mean is, a person will think about something randomly, and if they don't push the thoughts away immediately, they will start to obsess over those thoughts and become depressed. Is this a known phenomenon?
In Cognitive Behavioral Therapy, one way to break this cycle is to examine the intensity of the anxiety, or the propensity to think anxiety-inducing thoughts, in different locations, home, shopping, gym, library, movie. Breaking the cycle by limiting time spent in the anxiety-inducing location is beneficial because triggering depression might trigger more anxiety-inducing thoughts, which will add to the depression...etc.