Recently, I'd been caught in the trance of bad habits. You know when you're on a bad diet, and you subconsciously switch off the self-judgement to make it easier for yourself. That switching off also makes it easier for the bad habit to propagate.
This is essentially the bad habits version of the sunk cost fallacy. I am already suspending reality and judgement, let it continue.
The way out of it is to realise that nothing is ever too late, that it's overall better to stop now than to stop later, even if what you have started on is deleterious. The past is gone, you can only act on the present. Curiously, fully accepting and owning what has already happened is the 1st step to redemption.