Yes I can understand it ,our mind is like a battleground where we sometimes fail in front of negative thoughts ,we tend think of our failures without our consent but whenever you feel like a negative thought pouring just say NO ,com and your mind that its not worthy to you as what happened was the past which cant be changed but what is right now is most worthy thing .Don't allow ur past failures overpower your present .just chill relax,do whatever u like .and most importantly failures are not something we should be ashamed of rather it is the first step towards success so take it in positive manner and spent your time in turning your failure into success not on harassing your mind thinking of past failures.Believe me it works.