Work on projects wherein you cannot lose.
Involve yourself in projects wherein, even if the project itself fails, you will have benefitted in some way.
You may benefit by learning new skills.
Perhaps you will gain valuable knowledge and experience.
Maybe you will form relationships that you otherwise would not have formed.
Regardless of the outcome of the project itself, look for the bright side in whatever you do.
By thinking about life in this way, you will always be successful.
You cannot lose if you remain grateful for what you have gained.