In the state of shock it is impossible to act with presence of mind. When you are in the midst of anger, it robs you of reflection. You lose your clarity.
Then the right thing to do is to withdraw. Keep still until your composure and clarity are restored. If you withdraw in time, you can remain free of mistakes.
Others will be displeased with you. They may even call you passive aggressive. Let it go. It’s the best thing to do when you are surrounded by anger. – Shar McBee