In the face of blazing anger, I think the first reaction is feeling frightened or feeling angry back. We become defensive and even accusatory in self-protection. Those are valid reactions and sometimes very useful.
But sometimes angry energy isn't the way to go. It's rarely helpful to the person who was angry in the first place.
If possible, I think a better reaction is to try for empathy. Looking past the anger to the root emotions, maybe you would say to the angry person in a sincere and loving way, "I'm so sorry for your pain. I feel helpless to help you, but I care and I want to understand. I wish things were better for you right now."
Try it sometime. It's not the most instinctive reaction and it takes a bit of practicing. But I've had good results with this when dealing with extreme anger situations, especially with my children.
It feels better to stay in connection with your love for the person rather than to slip into your own ego defenses.