Don't react quickly to anything as a leader. You need to think. Especially when you are attacked or your team is attacked or your company is attacked, take a few seconds to breathe and think logically.
When I've been heated in the past, I've learned to step away from the conversation for a couple hours. It may be a Teams/Hangouts/Slack conversation, or text message, or email... Then I consider: Do I even need to respond to it at all? It's often better not to even respond.
If a response is warranted, be cold and logical without any sign of emotion. Don't fuel it with emotion.