Firstly, it's not true that people only self harm to feel pain... it's a control thing, and if he does it when he's angry the likelihood is that he's doing it to regain control over his emotions by controlling his body. Does that make sense? If you focus really closely on the action, the cut, you forget the emotions you are feeling temporarily.
Really, then, he has to address whatever is causing the emotions which he is trying to block. The self-harming is more than likely to go away once those emotions are under control.
Also, just a quick query - has he ever completely lost it emotionally, the classic 'seeing red'? Because it might be caused by a fear of what he might do if the emotions take over, not just a way of avoiding the emotional pain. In that case, maybe anger management or something would help?
Obviously I don't know him so I'm just speculating on what the causes could be... I'd talk to him about it in more detail, read up on the internet and see why harmers say they do it and then suggest reasons to him. Unfortunately, as hugatree said, all you can do is help him through it, there is no way of stopping him unless he wants to. Don't try and rationalise it to him or explain why he shouldn't do it, it'll just end up making him feel guilty and he's more likely to hide it from you. It's a blessing that it's out in the open now, try and keep it that way.
Good luck, SBxxx