My wife hits me when she's angry.

My wife and I have a real good relationship most of the time and we are really good to each other. I honestly love her so much. It's just when I do little things wrong or annoy her, she just blows up into an angry rage and started abusing me and belittling me and then smacks my head. It only happens when she's angry and then she would cry after saying she didn't want to hit me. I forgive her because I assume it's just because she's angry. Today was different, I don't really understand how a garage door works because I never had one prior to moving into our house. I thought the string attached to the motor would close the door but it just disengages the lock. I noticed I fucked up so I was going to fix it but my wife came out to see what I did and when I told her all hell broke loose. She didn't want anything to do with me. She wanted me to move out and pack my bags and started to smack me across the head. I didn't want to do any of those things as I understood my mistake. I just wanted to fix the garage which I did. I then went into my office to get a bit of silence and she came in crying about it all again.

I'm not sure what to do.

I should edit: we have been together for 8 years and married for 1 year nearly. Plus she is currently 15 weeks pregnant.

I took some advice and brought it up with her that night. That it upsets me the way she regulates her emotions but I was also taking responsibility for getting her angry. I mentioned possibility of seeking our therapy for the anger management and that didn't really go to well. She just says that I make her angry and I just need to stop making her angry and then threatened to leave and go to her parents house.