Failing at something does not mean you are a failure. Failure is only when you give up on yourself and stop trying.
I've said this before but it's worth saying it again here. Thomas Edison was once asked what it felt like to fail at making a light bulb thousands of times. He responded, "I have not failed. On the contrary, I have successfully found thousands of ways NOT to make a light bulb".