hi!
I've exhibited a similar pattern of behavior in my relationships (you wouldn't happen to be a Cancer, would you? jk). What it took to change, for me, was a partner who could understand what was happening and was willing to make an effort to help me change. After a few fights (that began fairly similarly to what you described), my partner and I made a code. If I say "hold me closer tiny dancer", he knows that I am feeling insecure and he knows to make an extra effort to make me feel loved. Sometimes, I can abuse the system or get too grumpy to use it entirely. I'm fortunate to have a partner who is highly emotionally intelligent, who is willing to point out to me what I'm doing. We have a code for that, too - he tells me "oops, you dropped your smile" and boops me on the nose. That silly little gesture lets me know he sees me, and that maybe I need to take a step back from my feelings. It is not a perfect system, but just knowing that my partner is aware and willing to work with me is immensely helpful. At first, I could get really embarrassed and even more insecure when I realized he could tell what was going on in my head; but once I let go of my ego and just leaned into it with appreciation for his effort, I found that I could laugh at myself and diffuse the mood more easilly. Using silly phrases for code words rather than serious talk definitely helps lighten the mood, and can help keep the issue private in public.
Anyway, even if my silly system isn't for you, I think it bodes very well for you and your relationship that you are self aware and willing to open up and she is willing to work with you. Best of luck!