Oh, op... all these people saying pick your battles.
We are in the middle of something so stressful and unnatural right now. I lost my shit with my DS (6) a few days ago when he wouldn't go to bed, I stormed into his room, gave him a smack (!!!!!) And shouted at the top of my voice.
I was disgusting. I didn't recognise myself. Something just switched, after a whole day of him going on.
He went silent and I returned downstairs. That night I couldn't sleep, I couldn't focus because what I had resorted too.
The next day I gave him lots of attention, cuddles and a calm routine. I forgave myself because the alternative was continue to beat myself up about it, I've taken it as a learning curve, how can I do better/be a better parent next time?
Please don't beat yourself up too hard. Do some enjoyable stuff together after that incident, I always find having a chat with my DS about what happened if we lock heads helps,
"Mummy knows you don't like having your hair brushed and mummy shouldn't have got quite so angry. I apologise for shouting. Next time we need to brush you hair, what can we do to make it better?"
As long as these incidents aren't happening all the time, please don't be too hard on yourself. Ignore those who are saying pick your battles/don't behave irrationally. We are all human, it happens, its how we grown and learn from things like this that ultimately makes us better people/parents etc.