You are right. Knowing your doing something wrong and continuing to do it is objectively bad. But some things are so deeply ingrained in your behaviour that simply thinking, 'I will stop doing this thing' does not work. You have to strategize and plan against yourself almost as if you are a different person in order to make sure you do not do that thing. And if you fail to stop doing that thing, sit down and analyse what went wrong, why it happened, and how you are going to prevent it. Sounds like the cliches we have all be taught as a kid, but it does work.
But maybe this isn't a post for solutions, but for support. In any case, self improvement is good, by all definitions. I hope you feel better, :D