You are going to fail. This is one thing you need to know from the start. The only problem is that you don’t know when it’s going to happen. Even if this might sound as a paradox, you must acknowledge that failure will happen, but never consider it as a possibility.
You have to treat everything as failure is not an option, but when you do fail you must take advantage of it. Most of the times, failure is a better lesson than success. The secret is to learn from it as much as you can when it eventually comes, and then keep on going.
It’s your duty to do whatever is within your powers to succeed. Never start something believing that it will fail because, if you do, it will certainly fail. That would just be a waste of your time and resources.
Do your best and when you fail learn from it and move on.