Now, granted, the line between "I just wanted to cheer them up" and "I showed them CBT" can be blurry but as soon as you take it onto yourself to actively make them better, I'd say you are strolling down a path you shouldn't. The main reason being I doubt you are an expert. The other reason being that it can affect you because you are close to them. And lastly I do not think just one such hint in the right direction is going to help the person suffering. Practically all therapists and people who have ever taken therapy will tell you just how much it feels like 1 small step forward 2 steps back, how much of a constant struggle it is. Changing a behavior is never easy, much less so if it is something that was "programmed" into you since you were a child, something that is your very view of the world. Understanding the mechanisms and a few techniques of CBT can be empowering, absolutely, but it takes so much more to actually make them work and work in the long run, to actually make you feel better and get out of that hole or to change... and not all people have that much energy or ability to introspect and watch themselves what they are doing AND then come up with ways of making it stop. Maybe in the long run it would be more helpful for them to just seek therapy?