Failure is useful, but it's also no fun. When things go poorly, it helps to have a plan in place to cope and move on. John Caddell, writing for productivity and creative thinking blog The 99 Percent, suggests that your plan should be another project so you have something to do rather than dwell on your lack of success:

Every day we try to do well and minimize our failures. The problem is, we're going to fail…
Read more Read more

If you work independently, it is always useful to have a project already prepared that you can take up when another project fails - call it "Break Glass In Case of Failure." If the main project falters, you have another project you can pick up right away, which can help with restoration by taking your mind off the failed project. And, if it's similar enough to the project that failed, can be a conduit for working through the loss.

It always helps to plan for the future in practically any situation, whether it's your next project, job, hobby, or whatever. You don't have to act on it right away, but knowing you have a plan is enough to give you the confidence to move forward when things don't go the way you'd hoped. It's simple advice, but it's easy to lose sight of when you've got one big thing on your mind. If you've got a project on your "someday" list, you'll be more prepared when someday suddenly comes in a moment of failure.