This is a great question and something I’ve needed to work on in my life as well! From my personal experience, staying rational during a time of heightened emotions is a skill that takes time, practice, patience, and support. Emotional management can be complicated and you will likely go through some trial and error finding what works best for you. For this reason, I highly recommend working with a mental heath professional in this journey.
By doing this you will have someone who will be able to support you in finding the techniques that work the best for you! Since each person has their own individual strengths, areas for growth, triggers, and needs, you will likely need to explore a variety of different skills and tools. You can prepare, practice, and discuss what worked and what did not with your support person so that you can make adjustments.
I know from personal experience that this process can be very frustrating at times and you might not see progress as quickly as you would like. Which is why I want to encourage you to be compassionate and patient with yourself with the knowledge that while there are bumps in the road, you are learning and growing!