I used to do that too..the whole smack myself in the face over and over for making a mistake, no matter how small or insignificant. To be honest, last time I did it was about 6 months ago, so at 29 I'm not completely over it either. Definitely means you're punishing yourself and highly self-critical. So much so that it's become practically an automatic response. Maybe bring it up in therapy and tell your therapist that you'd like to address the possible causes of it and how you can learn to stop it. Sometimes in therapy you need to be proactive or the session will just drift from topic to topic.

It's really hard to stop the self-hatred, but it will be worth it if for no other reason than you'll be able to better love other people.