Anyone who is trying to start new habits, or maintain and improve the ones they already have, knows that it is a lot of hard work. You succeed for a little while, then you "fail," then you succeed again, and the cycle repeats. This is okay. It's a natural part of building any habit, and it's even possible that you aren't "failing."
Allow me to clarify what I mean by not failing. Of course, if you are not sticking to your habit, you are technically failing at it, but sometimes you have to look beyond your habits. Chance are that you want that habit to stick because you believe it'll make your life better. In this way, the real goal is improving your life, not sticking to your habit. So, as long as you are still working on improving your life, then it is okay that you "failed" at your habit (at least temporarily, you'll have to decide if you want to start it again or let go of that habit).
More than likely, you even replaced the habit you were working on with another one. If the new habit you're sticking to is good, then keep are doing it and either add back in your old one, or just let it go.
I've neglected posting to this blog for several months now, and I've also neglected several of the habits I was working on building. For a while, I felt bad about this. However, I've come to the realization that it's okay. While I "failed" at my habit of posting to this blog regularly, I succeeded at the habits that replaced it: studying for classes, working a summer job, and studying for the GRE. All of these were great habits.
If you feel like you are failing at something, check to see if you are actually failing at improving overall, or if you've just started new habits that are equally helpful, if only in different ways.