That’s how our brains work. There is only so much that our brains can handle at any one time. Being distressed or angry takes energy away from the thinking part of the brain.
You might think of the thinking brain as a light and the emotion part of the brain as the dimmer. The light is always ready to shine, the dimmer may lessen its impact. The thinking brain is always there, but sometimes, it is dimmed by emotions.
When you are angry or distressed, you simply can’t think straight. This is not the time to make decisions or announcements, especially ones that can have longer lasting impact. (“Speak when you are angry, and you’ll make the best speech you’ll ever regret.” — Harry H. Jones)
Recognize when you are too angry or distressed to think straight. Delay important decisions (and as applicable, dealing with anyone or anything, even unrelated.) until you can think coherently.