Failure is part of a growing process. Scientists, high IQ people, they have their failures. Though it's thanks to their failures they can learn. But then, these aren't failures, they're just things which didn't work at the time.
During training on a job, we had a test. One person told me afterwards she was disappointed. When asked why, she responded: she did worse than she thought.
As this was only a test, I told her not to worry, at least now she knows what she does and what she doesn't. Somewhat later she passed her exams.
Each day in our lives we learn new things, we make mistakes, but from them we learn.
At school, I never did really great, just average, today, so many years later, I still grow and learn. Once I had a test and I was so amazed I did so well.
We underestimate ourselves sometimes too often, however now I've learned to do my best, hope for the best and be prepared for the worst. This has nothing to do with lack of self-confidence, quite contrary, I' start to know what I can and then look where I can improve. This is where we start to gain and show our self-confidence. Knowing our weaknesses is exactly what makes us strong, what makes us grow.
Someone who's confident can admit his weaknesses, as he is no longer afraid of them.