No one does everything right and trust me, no one is supposed to do everything right.
Dwelling on failures will not make it go away or erase the fact that it happened; though, is a good way to keep yourself down in the dumps and living less than a life.
Let your failures act as fuel in your ambition by learning from mistakes and plan to do better next time. Mistakes are life's measurement meters that helps us understand how far we have come, going and where we will be.
Knowing the best thing to do is not supposed to be our string suit. We try to achieve the impossible every time not because we have a key to doing that, but because we have the mind to do it exactly the way we feel it will mean something.
Mistakes are not made to kill you, they happen because something just didn't go well with your plan and execution. When you get caught up in some mistakes of some sorts, take a deep breath and learn to live with it because, it can never kill you but instead make you better.