I feel like complete shit

I work so hard at being patient with my son and keeping a strong connection with him. Last night he was up all night, I’m 9 weeks pregnant and I fought him for two hours going down for nap. He went down right away but woke up 10 Mins later and would not go down. He needed to go down early and was soooo grouchy all morning. I let him cry in his crib (which I never do) I yelled, I punched the bed, I cried hysterically and all for nothing too. I never do any of those thing. I feel like a horrible example for him and that he hates me now 😭