It is difficult to reprogram your mind to respond to different messages from those currently playing. I won’t pretend to oversimplify the process. If however a person is able to change the outlook on failure and view it as an opportunity to explore possibilities I think it leads to greater happiness. I also firmly believe that, especially in Buddhism, there is no wasted effort. Anything we do, no matter how seemingly small and insignificant, and no matter if we completely succeed or not, is not a wasted effort.
Lotus Path: Practicing the Lotus Sutra Volume 1