Yet again answering this question... (The next person to ask it should really do a search instead):
First of all, this is going to sound like I'm "really messed up"; but I'm not actually doing that badly. Self-injury, except for a few months a couple of years ago, has never dominated my life or become anything other than a way to control myself when I felt nothing else could do it.
I've used self-injury in various forms since I was about six; before that I'd just tantrum, run and bounce off things till I was exhausted. By the time I was 11 I was drawing blood, and it turned into "classic" superficial self-injury with razors and pins during college. I've also been known to bang my head, but usually it was gentle and repetitive, against a pillow... only once did I do it so hard that I left a bruise (and gave myself a mild concussion, if the dizziness was any sign of it).
The biggest triggers for self-injury for me were that I'd feel overwhelmed by an unpredictable environment, or overwhelmed by my own emotions, or suicidal enough to know that injuring myself was the only thing that could reliably force my brain out of its "kill myself" mode.
Self-injury, for me, has always been a rather brutal sort of distraction; a way to control myself, to feel strong, to escape. It amplified as my meltdowns decreased; so, likely, it is a way of staving off the "out of control" feeling you have during a meltdown, panic attack, or other such intense state.
Lately, I've been working on finding other ways to do the same things I used to do with razors. Logically, it's not a good idea to scar yourself up when you're already known as "weird", socially; and then there are the small risks from infection to worry about. Learning a better way of emotion-control and stress tolerance is really necessary, since self-injury is generally unproductive, works only for a short time, and doesn't help you deal permanently with whatever's bothering you.
For a year, the frequency of SI has decreased steadily, so that now it's been about three or four months since I did anything that broke the skin (I still pull my hair or bang my hand/arm against the edge of a desk or slap myself, but those are more stims). My replacement is mostly to know myself well enough that I know when I'm headed into one of those uncontrolled states, and to either use logic to withdraw and talk myself through things, or to find a way to avoid the situation.
I'm also using my old trick of imagining myself inside a blue force field through which nothing can penetrate, not even noise... this works well in situations where I'm going into sensory overload.
I'm not sure if the Lexapro I've been taking for the past two years is helping with the SI specifically; but I don't think about suicide as much now than before I started it, so maybe it's helping indirectly.
Anyway, my advice to people who hurt themselves:
--Find out why, then find out a better way to fill that need.
--Take care of yourself, physically. You don't want anything getting infected.
--If you need meds, take 'em. It can't hurt to try.
--If you're an Aspie, you're probably pretty good at logic. Use that to help yourself.