How does Buddhism deal with failure?
Why would you want to cope with those feelings?  Feeling bad about failure is the whole point!  It makes you less likely to do it again.  Embrace those feelings.  They are a gift that will help lead you to further success.