There will always be someone better, smarter or a faster learner but that doesn't diminish the progress you've already made. There are people who have talents for certain things, there are people who learn certain things faster. I've found that competing with myself is the only healthy way to move forward or I would always feel that I'm not good enough compared to others.
As it was already mentioned in the comments, there is nothing wrong in pushing yourself when you want to improve, but don't take it to the extreme. We operate on work/rest cycles and as you need discipline in work you also need discipline in rest. I try to look at the process of improvement like a marathon rather than a sprint. The journey is going to be a long one, so don't lose the joy of it by pushing too hard. Think about how long you can go like this and consider if this would take the fun of programming away. Think of unproductive activities as a way to get your mind some rest, much like sleep.