I don't hit my head, but I punch my own arms or hit my arm against a hard edge like a counter or wall corner.
It's something I do much more impulsively in the moment if I'm frustrated or upset with myself, unlike cutting which requires at least some planning, being at home, and cleanup. That makes it a lot harder to quit.