Knowing 'nobody is perfect in this world' doesn't make it easy to accept our own shortcomings and mistakes. Our brain continuously plays a blame game with us and we find ourselves vulnerable. It fails us to have strong emotional control and thus we lose control over our actions too. This chain will run until we learn and practice self-compassion.
Self-compassion is nothing complicated and not hard to practice. We all can be aware of where we are being too rude to treat ourselves. If you made your friend cry, it's bad. But if you torture yourself for that act, it's not okay. Yeah, you can make a way to make it better and figure out how you learn the best from this to not repeat the same. But never treat yourself badly.
Find your way to be the best, to be a good human.
Improve self-criticism but not self-hatred.
Accept your personal shortcomings.
Free your mind from guilty feeling and stop blaming yourself.
Forgive yourself.
Focus on the positive sides of you.
Be warm to yourself and take personal care.
But as sometimes we do mistakes knowingly and unknowingly. Making an instant decision to treat ourselves bad is a worse decision. We should take our time to figure out how we can make things better. Forgive your wrongs and promise to be a better person. Don't promote hatred for self. It's very counterproductive which doesn't let us develop ourselves. Also, it will make us stressed and anxious. As long as we don't promote compassion for ourselves, we will never find mental peace.