Hi J. -
I listed links to a few articles that you might find interesting in regard to head banging and tantrums.
First off, don't worry, its nothing you've done and since you haven't mentioned anything other than tantrums, he's not austistic. Kids who are autistic do have head banging tantrums and will rock or bang rhythmically but they also don't look anyone in the eye, appear to be in their own little world, they don't connect emotionally by showing affection or smiling, and they often have speech delays.
It's also very unlikely that your son can hurt himself even in the heat of the moment. Bumps and bruises, yes, but permanent damage is unlikely. If you're very concerned, your pediatrician can probably offer some input at your next well-check.
My very intelligent, outgoing, and athletic 5 year old was a rhythmic head banger starting at 10 months - he still does it when he is tired or upset. (It was so bad at one point my next door neighbors asked if we were doing construction in our home!) My youngest is 23 months and is a tantrum banger. He has a very outgoing personality with a strong stubborn streak. He doesn't speak as well as my first did at this age and I know he gets frustrated because of not being able to communicate everything he wants. My first never had the same kinds of outbursts that the youngest does. Youngest finally banged his head so hard that the next time he went to go hit his head, he thought twice and decided not to do it. He still throws himself to the ground in amazing displays of emotion however. I let him lay there 5-10 seconds to let him work it out and then I pick him up and love on him. After he banged his head, I would just talk to him in a comforting way reminding him that it hurts to bang his head.
The best thing to do is be very matter of fact about it and not reinforce the behavior by freaking out. It's hard to do, but so necessary. Otherwise, he'll learn exactly what to do to pull your strings.
We started playing a little game with the boys to "get the frustration out". The older is better at it of course but the younger likes to copy and play along. We pretend to blow it out with big breaths like bubbles and then we wave our fingers about our heads like we're popping all the "mad" bubbles. It's dumb,I know, but it helps them visualize a different way of getting rid of it.
I hope the articles help you! Feel free to write if you have any other questions or just want to commiserate with another MOHB (mother of head banger)