I used to fall into cycles like that, and I deal with chronic pain which causes me a decent amount of anxiety. I also went to therapy with the specific goal of learning how not to fall into spirals of anxiety anymore. It has been very helpful for me.
I also found it helpful to tell someone I trusted to ask me when they notice I'm isolating if I need someone to talk to about it so I won't have to do the work of reaching out. This was helpful for both of us because they had been feeling like there was nothing they could do to help me if I didn't talk with them about it, and it may be a personal thing they shouldn't bring up, and I was secretly hoping someone would care enough to ask.
Maybe when you're feeling well enough to do so, asking someone who loves you to reach out to you when you need it would be a good choice for you.