I don't know how to stop it but I experienced something similar for a few months when I was struggling with uni, a breakup and our puppy dying.
I wouldn't normally throw up, but would have a gag reflex often, especially when eating.
After a while the anxiety went away, I tried to find ways to speed that up, but in the end it just took time. The only ways I could help the gagging was to snack less so I was hungrier for main meals and to not drink much alcohol at all. But you make yours sound like it's less to do with food/drink?
Are there present reasons for anxiety or are you chronically so? In which case you could consider medicating?