You say he is easily angered when he is rejected. So I assume it's a ongoing pattern. If it were me, and if it had been going on more than a week or two, I would assume what I have been doing to address it is not working (and might even be counter-productive) and I would change what I was doing. I the specific instance in the elevator, I would get between the kids. I might say nothing to my kid, or, at most, I would say "no hitting". I would not act shocked or get emotional toward my kid. I might express some concern toward the other kid.
Good that you asked about the incident later and got some clarification about what was going on. I might ask him if he can think of some alternatives to hitting in that situation.