If you're not seeing success as something fluid rather than a defined endpoint then you will always be a failure. Each “success” is really just a goal or stepping stone on the way to the next one. Success is a journey or a path. Each time you go along that path you may fail. If failure on that path is the worst thing that happens then it's not so bad.
If you fail you have succeeded in finding the wrong path. You now know not to try that again because you will fail. Think of a pathway with three possible directions. If you have chosen one and found it to be a failure that only leaves 2 more. You now have a 50:50 chance of being successful if you pick the right one. By failure you have become more educated on your journey and more likely to succeed.