Anecdotally I find swearing makes it worse. Now I just saw "ow!" or "that hurt!" Which honestly feels like it synchronizes my brain past the insult and I can move on much faster past it.
Initially the work from the 70s-80s on vervet monkeys https://pubmed.ncbi.nlm.nih.gov/7433999/ which was then found to be generalized for a host of other primates
~1 for danger in the air
~1 for danger on the ground
misc for unspecified danger
I would bet that modern swearing maps to these calls in a less specific way. Equivalents of "this shite" "that arsehole" and "damnnit" may have an evolutionary origin.
That being a possible reason why certain words alleviate, they actually operate at a different level in our conciousness.
I dunno why, but wow seems to work well for me.