It happens to me when I code all the time: Create something just to later discard it and start new from scratch. You make two steps forward just to make one step back again. It's frustrating sometimes.
Come to think of it, it's just like real life. Sometimes you're trying to make a change in your life, trying to adapt some habits, like trying to stick to your marketing schedule or diet plan. Then there's times when things happen, you slack and fall back to your old habits.
It's a bit like marble in a funnel that's slowly rolling towards the hole in the center. You're trying to roll towards the center, but sometimes you go too fast and bounce back to the outer edge. You do this until you finally achieve your final breakthrough: when your good habits finally stick and your code finally works (well... mostly ;) ).
Just like in gamedev.
So when you practice going through this with gamedev, it will likely spread over other parts of your life.
Code away, never stop creating and keep making awesome games!