Those suggestions above are great, and very true. To help mitigate the sting of failure, even though it hurts I still push on and make a small goal that I can succeed at. This helps to give me a solid footing that I can build on and make increasingly larger goals as I go.
Also I listen to a lot of aggressive sounding Metal music with positive messages of growing and being relentless in the face of adversity.