I think the primary way in which people try to fight the urge to self-harm is through the use of coping strategies. Here's a link to the "Sticky" in the Self-Injury forum (just in case you hadn't already noticed it) that lists things to do instead of hurting yourself, :
Things to do instead of hurting yourself
And then also here's a link to an article, from Psych Central's archives, that offers some suggestions. The article is targeted toward parents of children who may be self-harming. However (hopefully) you may still find some useful suggestions within it:
Helping Your Child Reduce Self-Harming Behavior