Ocd thoughts keep setting off panic attacks

My OCD thoughts have started triggering panic attacks, and it feels like a horrible feedback loop. A thought pops up, I get scared by it, then I panic, which makes the thought feel even more dangerous.

I know the thought itself isn’t a threat, but my body doesn’t seem to understand that. I’ve been trying to avoid reassurance seeking and remind myself that thoughts are just thoughts, though it’s really hard during an attack. Has anyone found anything that helps break this cycle?