No one is perfect, and neither are our circumstances, but as humans, there is a very real tendency to find shame or blame in mistakes and perceived failures. Neither of these are productive. Blame is an attempt to control that which is out of our control: the actions of others. This infringes upon the autonomy of others. Shame is holding yourself to unrealistic standards of performance and reframing problems with your behavior as problems within your fundamental identity, therefore removing them from your control.
There are other options in response to mistakes and failures, however, and perhaps the most useful is that of growing and releasing. Instead of shaming yourself for your mistakes, learn from them and thank them for what they taught you, then let them go. If someone else makes a mistake that affects you, learn from it. Take the new things you've learned and change or stop your own interactions accordingly, and as you move past the instance, know that you are stronger and more aware for what you have learned.
What is a mistake or failure you have grown from and past? What is one you want to grow and release from?