I get triggered easily

I’ve been dealing with my fair share of mental health issues for a while now. I have been trying to get help for the past several years, but I have been denied by my parents, so sometimes I tend to spiral out of control. I have a tendency to harm myself when things get bad, I try not to as much as I can, but my home situation and my general mental state keep me from doing so. There are certain things that trigger me, even when I’m doing well. The biggest one being my friends talking about having a rough time themselves. For example, my girlfriend recently had some family issues of her own and wad very distraught over it. I listened to her the best I could, but now I feel extremely depressed and I have the urge to hurt myself. This is a common occurrence, it also happens when people talk about being in therapy or being medicated, there are a lot more things that set me off that I don’t want to spiral into right now. I was just wondering if anybody knows why this happens or how to make it stop.