Premanand Maharaj Ji
How do I avoid negative thoughts and depression after failure?
Stay balanced and chant the Name
With knowledge you can stay even-minded in success and failure. After failing once, gain the skill not to fail again through naam jap (chanting his name). Without joining the mind to Bhagwan, negative thoughts can lead to more failure.
Having failed once, we should gain such skill that we do not fail again, and that comes through chanting Bhagwan's name.