Mad at poor dog

My dog got soaked tonight in the rain trying to go pee.  I took him in the bathroom to blow dry him (he's a shih tzu) and i went to roll him over to get his belly and I don't know if he was scared or what but he would NOT listen and kept trying to squirm to get back on his belly and I got mad and kept pushing him back down and yelled at him and then grabbed him and gave him a spank on the behind and put his face in mine and told him you need to behave!  Like the poor dog has any idea what I'm trying to say to him, he gave me his sad eyes and I just feel so terrible now.  He is 100% fine and obviously forgot/forgave me because he's all running around and licking me...but why the hell did I do that to him???? I got so frustrated and now I'm thinking wtf me, you're having a baby and you can't act like that!!!! Is anyone else getting weird/ frustrated to the point where you lose your temper??