As mentioned by my favorite Mathematecian Albert Einstein which became my Life Principle now :
"A person who has never made a mistake has never tried something new"
A mistake is just a manifestation of learning new things. It is part of the learning process. One can never be sure of doing the right thing given the uncertainties. Even the best has done a lot of mistakes, but they did not dwell on it. Instead, they used it to do better than the previous.
Mistakes sometimes are equivalent to failures, but it isn't. To support that statement, a great quote by Thomas Edison will complete the picture.
"I have not failed. I just found 10,000 ways that didn't work".
Often times we commit mistakes in our life. The most important part their is having the mindset to be better next time and think of it carefully before doing it.