A.F.
It is actually a pretty common things for toddlers to do this. I have always heard that you should "ignore it" obviously not completely, you do need to make sure there isn't anything sharp around or something they really could do damage on when they bang their head. But they will NOT bang it hard enough to cause any real damage, a bruise a bump maybe, but nothing that would really cause harm.
My cousin's daughter used to bang her head on everything! She did this for years and has never caused any damage.
This is true for most of the cases. However, you should still mention it to the doctor so he can take into consideration other things that could cause it, b/c if he is biting himself hard enough to break the skin often then it might be something other than an angry toddler.
Good luck :)