I've gone through similar episodes, so please understand that you aren't alone and it isn't permanent.
You already recognize how the compulsions are making things worse, so the next question is, how do you NOT do them?
Well the gold-standard therapeutic technic for this is ERP (exposure response prevention), so my best piece of advice is to speak to an OCD specialist. I understand you're already talking to 2 different counselors, but if you aren't actively doing some sort of exposure therapy than this pattern will likely continue, unfortunately.
Of course I understand if that's still not an option, so here are some tips that have personally helped me significantly in all aspects of OCD and life in general.
It's okay for you to have those thoughts, and it's okay for you to feel anxious about them. The reason I say this is because we all assume that the thoughts are the problem, and that the only way to be happy is to get rid of them. This is actually false, and it's this exact instinct that fuels this terrible cycle. All of these thoughts about death, your own corpse, the frailty and "meaninglessness" of life, etc, are actually not the true cause of your suffering. The true cause of your suffering is your resistance to them.
If you practice allowing yourself to physically feel the anxiety that arises after being triggered, rather than trying to get rid of it or the thoughts, over time you will realize that you CAN handle the anxiety. You'll learn that the anxiety comes and it goes on its own, without you having to actually do anything about it. This will naturally make you less afraid of the thoughts themselves, and over time they will naturally occur less often.
It's kind of a backdoor approach. Instead of trying to get rid of the thoughts with force, it's more like you plant the seeds that will one day reduce their power over you.
If nothing else, just do a deep-dive into mindfulness. That's what I did when I had really terrible suicidal OCD, years before I ever starting going to an OCD specialist. Practice it diligently, and you will slowly realize how many mental health issues are related to us being unable, or unwilling, to truly be in the present moment.
Best of luck. Happy to share more tips if any of this interests you.