I do it all the time in my role as a parent.
It's not that I expect perfection from myself - I can handle the reality that I am human and therefore imperfect - mostly. It's that when I realise I am doing it or have done it I am sometimes too quick to berate myself for it.
I am talking about nagging at them, or raising my voice, or looking at a screen while they are talking to me, or answering more abruptly than I would like to, or not sounding captivated enough when they are telling a long story ... I could go on.
I balance this distracted and fractious Mum with hugs and kisses and ILoveYous and thoughtfulness and caring and empathy. I read all the time to learn about myself so that I am able to move my Stuff out of the way of being there for my children and mostly it all balances out.
When I forget all the good, and just focus on the bad, there is a danger of becoming stuck in the idea that I am a bad mother, and therefore a bad person. And that little view of the world doesn't help any of us: me, my children, or you.
Just because we sometimes do things we are not proud does not mean that those things we do (our behaviours) ARE us. We are not our thoughts. We are not our behaviours. They are both things we can change - if we choose.
What do you tell yourself when you screw up? How is that working for you?