Well, we're doing ABA with ds, and the approach is basically to consistently ignore 'inappropriate' behaviour (headbanging being one example), and reinforce (ie reward) good/appropriate behaviour. There's obviously a lot more to it than that, but just as a rule of thumb, following this principle you would either:
distract with something completely different to the thing he wanted. If this doesn't work (as you say it doesn't), then:
totally ignore the headbanging/tantrum until it is completely over, then once you know he has totally calmed down, carry on with what you were doing beforehand, chatting all the time. When he has stopped the headbanging or whatever, and calmed down, then give him what it was he was asking for. The key thing is that he should get the 'reward' not by tantruming or headbanging, but by being calm and asking appropriately.
It is difficult to ignore behaviour like this, and takes lots of practice to put aside the natural instinct to comfort/distract, but the basic message to the child is that inappropriate behaviour (shouting, hitting, banging whatever) basically doesn't get him what he wants. Eventually he should learn that he needs to try another means of communicating.
The key thing is to let him know, in a way he understands, that you will give him what he wants, but just not if he shouts/bangs/tantrums to get it.
I don't know the level of understanding your ds has, and he is still very young, but you could try saying clearly, calmly and slowly "I will get xyz for you when I finish washing up/tidying/whatever". When you are confident he understands this, carry on with doing what you need to do. Ignore whatever he is doing in the meantime. When you have finished what you are doing, give him the thing he wanted.
I am sure he will not hurt himself by headbanging - he is doing it because he's a smart cookie and knows that you come running when he does it. If you stop doing this, and teach him more appropriate ways of getting your attention, he'll realise it's simply not effective, (my ds went through a huge repertoire to get his demands met that instant, including a particularly charming phase of pulling my top and spitting on it
until eventually he twigged that if he just calms down and asks nicely then he might get what he wants!).
This probably sounds a bit hard-core, and is based on ABA therapy so might not be totally appropriate, but tbh I think it's a good rule of thumb to start as early as possible letting your dc know that you're in charge, not them.