Previously, I suggested that one way to change your mind is to start with a discipline, evolve it into an habit, and let the habit reprogram your thinking.
Getting through the discipline phase can sometimes be challenging. In my experience, old habits try to reassert themselves a lot in this phase and sometimes they succeed.
When this happens, one trick that I used was to always undo whatever I did and redo it using the discipline I'm adopting.