First of all big hugs to you because I know how horrible it is to watch this.
My DD started doing this around 12 months of age, her tantrums increased, during the tantrums she would throw herself on the floor and bash her head into the ground, didnt matter if it was carpet or concrete. She would even get up run to a wall and smash her head into the wall. Sometimes I would just break down and cry because I couldnt get her to stop and it was horrible to watch.

Turned out for us that is was an additive Annatto or sometimes written as 160B on food labels, that and she reacts to grapes. We found out that it could be this by accident and elimated it from her diet, within days she was a different girl, no tantrums happy no headbutting etc. Now she only needs to have something with 160B in it or a handful of grapes a couple of days in a row and she is headbutting again and a real horrible little girl to be around, it then takes about 4 days for it to leave her system and be back to normal.

The sad part is that Annatto is a natural additive but many kids have horrible reactions to it.

Its found in "plastic" cheese such as you singles among other products.

Not saying this is the solution to your troubles but could be worth looking into, who would think someone would react to grapes hey.

Best of luck xoxoxo hope it gets better for you soon.