Stress leading to impulsivity

I feel like I’ve made several impulsive decisions throughout my life during times of high stress when I felt trapped and just needed to find some sort of way out. It’s strange, because I’m not normally an impulsive person. I’ve often regretted those decisions afterward because I felt I made them based on my emotions rather than letting the emotion pass and making a more well thought-out decision with consideration of all the factors, rather than just the emotion. Do you have any suggestions for how to approach this to prevent making a similar mistake in the future?