Thats one of the biggest problem all of us and I guess most human faces... When we start thinking, the best way to " stop" thinking about that, its just accepting that now its what its in our head and as many other feelings it will pass....
When we have this thinkings if you realize we judge ourselves....you dont beleive already in the think.... And you "punished" yourself for having that thinking that "will lead me to fail again" Just accept its there and let it stay as long as it wants.....as you can see there are thoughs from the beggining that you dont have anymre...
Accept and be happy, fight and be sad...
When the student its ready, the teacher will appear... Even after all this time the sun never says to the Earth, "You owe me." Look what happens with a love like that,It lights the whole sky.