Hey A., sounds like your little man has some strong opinions and feelings that he is not being able to communicate well. He is quite literally "acting out". He needs your help developing his communication skills and his eq, so that he can effectively communicate his needs and opinions without head-banging and thrashing. A few tips would be to:
1. Help him to realize that communicating respectfully is going to be the must effective means of communication, by only rewarding his proper communication responses with action. So when he asks for something nicely, if it's a reasonable request, do your best to fulfill it, and let him know that you appreciated how nicely he asked. If on the other hand he did not ask nicely, nothing moves forward until he does so. You need to help him understand that head-banging, thrashing, crying etc are not appropriate means of communication. So for example: he starts screaming for a toy that's out of his reach. Acknowledge what he wants in as few words as possible "the red ball" and then when he says yes, tell him you will happily help him get it but he has to ask nicely first. Screaming for it or throwing a fit is not nice. And then, calmly hold your ground. He needs to understand that his actions of fit throwing will not only not move you to helping him achieve his goal, but they will also not move you to loose your temper or ignore him. He needs to be able to see you handling frustrating situations calmly and fairly. This will not only be a good example to him of proper communication(specifically you don't fly apart, use violence, or treat someone poorly when they don't act in the way you want them to), but it will pay dividends in your relationship with each other, and in helping him to develop self-control in general. This needs to be carried out in a way that's due not punitive, it is you patiently teaching him a very important skill set.
And the second tip would be to maybe re-access your night time routine, with your son. It doesn't sound like it's working for you all. So maybe sit down with him, when you to are both calm and connected with each other, and tell him that it makes you sad that he gets so upset at bedtime, and you want to make it better for him. Ask him what he likes about bedtime, or what he would like to do before bedtime. Explain the things that need to happen at bedtime (pull-up, brushing teeth, etc) and ask him how you can help make those things better for him. So maybe you can take him to the store and let him pick out the pull-ups he likes with Winnie the Pooh on them or maybe he would prefer to wear diapers. After you have compiled the list of to-dos for bedtime, teeth brushing, pajamas, story and being tucked in, put them into a set and agreed upon order. When it comes time to begin the routine, help him to focus on the process itself and the aspects of the process he enjoys like the story or being tucked in, and then, if you can find a way to turn the parts that he doesn't love into a game. For instance my son hated brushing his teeth, so I began telling him there were monkeys in there, I had to get them out, and making monkey noises while we brushed. He howls with laughter and asks me to get the monkeys out several times a day now.
My third and final tip is a little bit of a shameless plug, but I actually have a Udemy course specifically on tantrums. It's called: How to Quickly Stop or Prevent Tantrums. And you can use the coupon code: MAMAPEDIA2016 to get half off.
Good luck to you and your little guy. Just remember, you and your sons father are the two people in the best position to help your son. You know him better than anyone, and even though it's definitely challenging at times, no expert, book, or Mamapedia member loves him like you do. You've got this!