The best way I know how to deal with someone on the verge of losing their temper is to really be an attentive listener. I'll acknowledge what they've told me to let them know they are being heard ...
A hothead is to be avoided like an Aboriginal Armpit to be sure! My first reaction when I read the question was to tie a heavy duty weighted rope on him and throw him into the Baltic sea during the dead of winter, but then I realized your asking the question in earnest. I would image the proper answer would all depend on the person and the situation. What made the person so mad? Was it an injustice of some sort? Were they robed or harmed in some way?
There is a method a friend told me about once upon a time back in the day called the feel, felt, and found method. After inquiring about the issue you would say Oh well I understand how you feel, because that happened to me and I felt the same way and later I found that this was what I should have done. Something like that, but like I said it depends on what had happened that set him off.
I had a friend who was a sails man once too who liked to use what he called the George Washington method. Ole George would draw a great big ole capital “T” in the center of a sheet of paper. On the left side he would write down everything he was mad about, and on the right side everything that was stupid to be mad about it. Ole George found that the stupid side was always the longer list so, he know that what he was mad about was stupid and didn’t amount to a hill of beans and was not worth his time to be mad about. In fact he discovered that the more hotheaded someone was about it the funnier it turned out to be that he had lost his temper about it in the first place.
Then you throw him into the Baltic sea.