There is no rule in life that it has to be lived perfectly. It is not a crime to make mistakes. What is wrong is to make the same mistake twice.
Mistakes are what are required to grow a level up in life; to not linger in stagnancy. Mistakes are opportunities that we stumble upon to acquire knowledge. So be happy when you make more mistakes because it provides you with a chance to gain some lessons from it.