They say every black cloud has a silver lining. Find it. No matter how back you may feel, or how much you think you may be failing, think of the positives you have acheived so far. Moreover, even if you find the reason why you thing you've been failing (and, btw, no one fails until they've given
up completely), finding the reason alone - is a positive.
So keep looking for the silver lining - even in the darkest of clouds.