Bad Habits are like scratched records. They mechanically invoke undesirable behaviors to play out over and over again.
To break such patterns, first you must recognize their existence and trigger points.
Recognition gives rise to an intellectually honest reflection about the new outcomes desired, as well as the path (and constraints) to getting there.