Well I can't say I've had quite the problem you describe.

But what I can tell you, based on my own experience, is that hitting your head... especially if it becomes something you start doing a lot is a really bad idea.

I don't know what it is that has caused you to develop this habit. But I would encourage you to take steps to figure out a way to stop doing it. If you see a therapist, perhaps talk with that person about it. If not, perhaps the time is nigh? My best wishes to you...