I have a tip for you.
I have ADHD, so I will sometimes spit out something before I can stop myself. But 99% of the time I am able to stop myself. It just takes a little practice.
I had to take actual time from my day to sit in front of a mirror and role-play. I would imagine something someone might say to me and then repeat the line, out loud. I did this an hour a day for a week or so before it worked.
It seems really stupid, and I felt silly... But it actually really helps to make little scripts when you have trouble articulating your thoughts in a rational way. For me, I have three different phrases I go to when upset.