At least you recognized what you were doing and stopped. That takes grit and commitment.
Never forget what Upton Sinclair wrote in his book, The Jungle; "It is difficult to get a man to understand something, when his salary depends upon his not understanding it"