Cut your losses.
"Cut your losses. Cut your losses. Cut your losses. Then maybe you have a chance."- Ed Seykota.
source
Cut your losses. Cut your loses. Cut your losses and just go on to cut your losses while you can.
To have a chance, you just have to learn how to step out from the weight of the guilt of loosing and cut your losses so you can make some space for a comeback should you want to get another shot at it.
Don't fear that you are loosing and don't be scared to cut your losses early.
You have got dozens of chances and you will definitely get another shot at the failed task if you can just cut your loss early enough.