The more time you spend doing DIY projects, the more likely it becomes that you are going to experience an incredibly frustrating setback at some point. It is simply bound to happen, so it is in your best interest to accept that there is going to be an instance sometime in the future in which you make such a serious error that it causes you a great deal of time and effort just to correct. This is all right, and it will undoubtedly happen to all of us.
How you react to a DIY setback will determine how frustrating the setback becomes. If you can maintain a sense of humor about it you will be so much better off. There is a strategy to ensuring this sort of comical reaction, as you should always tell yourself at the outset of any DIY project that there is a good chance that you are going to make a mistake that no one else except you could possibly make. This will help you avoid making the mistake in the first place, and it will help you laugh it off in the event that you do wind up making a mistake that should have been easily avoided.
Sometimes this mistake will cause you to have to start over, and you simply must accept this. Walk away from the project for a while if you have to, but continue to recognize that frustration will accomplish very little. Laugh about it, walk away, and then move forward by beginning to think about what you will do to fix it. You may have to start over entirely, or you may have to do very little to correct your mistake, but either way you should feel grateful that the mistake you made was immediately identified and can be corrected somehow.
There will come a time when you spend hours upon hours working on a project, only to see it come completely unraveled when something silly goes wrong. It happens, and when it does, it will probably not be the last time it happens. Take this in stride and think about how much better you will feel by laughing it off rather than shouting it out. Through laughter, you will find that you learn much more from the mistakes you make rather than the successes you enjoy, so look at your mistakes as an opportunity for growth rather than as a frustrating setback.