As Thomas Edison once said, far better than I ever could, “I have not failed. I've just found 10,000 ways that won't work.”
Great breakthroughs don’t happen in a vacuum, they are preceded by lots and lots of failure. In fact, without all that paddling around in a big sea of Fail, it is doubtful if the breakthrough would ever have happened in the first place.
i.e. Failure is not the end of something that could’ve been great, it’s the beginning of something that will be great. Like an egg, it’s the beginning of new life.
The only issue is, whether or not your mindset is ready for that worldview. Takes a few rounds of failure first...