Your failures and setbacks are not a measure of your capabilities and potential.
If Edison (or Tesla) used his failures as a measure of his capabilities, it’s unlikely we would have electricity.
If the Wright brothers used their failures as a measure of their potential, we would not have air travel.
If J.K. Rowling took her many refusals as a measure of her abilities, then the world would not have Harry Potter.
If Abraham Lincoln took his setbacks as a measure of his potential, slavery would have carried on for a lot longer.
Failures and setbacks are momentary.
They do not define who you are, and what you are capable of.
So don’t let them define your life.