This could lead to never finishing anything. OP is asking about how to get through the infamous "valley of death". Just stopping is not necessarily the right action.
That is not what OP asked. You are throwing an assumption into the mix - that the goal of the project is to be completed. While that assumption is reasonable, it is also the core problem. Hobby projects do not need to be completed - they can just be for fun, for learning, for experimenting, or for any other goal wherein the journey is more important than the destination. If you get frustrated and tired of it, as the above comment said... stop.
The idea that all projects must push through all struggles and succeed is exactly what causes frustration. There can be other goals in life.