You have so much stress to deal with right now.
In my view saying the first thing that comes to mind is risky. I have certainly come to regret doing that in my own life. It sounds like the results of that have been problematic for you as well.
Another possibility is to cultivate a self-restraint that says “Give yourself a moment to think before you speak.” If you wanted to work on this you could, for example, meditate daily, or use the STOP technique.
STOP technique (four minute video):
Are you seeing a counselor? If not, it might be helpful so as to have further support for yourself.