This has been a very prominent issue in my life for the past few years. I've failed courses in University, I've done poorly at some jobs that I thought I'd love and be really good at, and there's a couple of goals I didn't end up achieving.
Here's the thing, don't focus on whether or not you failed, focus on why what things didn't work out the way you wanted. As far as failing courses at the U of T (there's been 2), I failed one for two reasons: first off, I was in and out of the hospital the entire semester, and two the course being taught in a top down manner which for anyone with ASD, is essentially a death sentence (especially in a linear algebra course). The second course I failed basically because I decided to put my mental health before my studies. The job, I basically just ended up really hating so that was that. Finally, the goal didn't get achieved because my priorities changed; I kept going back to it and thinking... this just isn't going to be worth the time, effort, and money I put into it in the end.
Everyone fails something at some point. My grades in school have always been very extreme, my transcript from the U of T has everything from a 89% to a 37% I've just accepted that sometimes things are out of my control, and also, if I really don't care about something, I will do the absolute bare minimum and cross my fingers... naturally this often isn't enough.
I'm not sure what else to say other than... smart people fail too, and failure is not always a bad thing. Embrace it, learn from it, and help yourself and other's avoid it in the future whenever possible.