Cigarette smoking is a special case because there is also a physical force in addition to an emotional one. I personally have no experience with it and modern analysis but will check into it.
For other habits, it would be a matter of detecting and dissecting the colors and shades of the emotions that are happening in the background (unconscious) during the activity. For example, if I let a trade get away from me'sometimes I get 'stubborn' and let the loss get out of control. But what is really happening is that when I initially allow the larger than planned loss, I get angry at myself and 'secretly' feel stupid - ie the voice in my head, the barely conscious one says "you stupid idiot - you have been trading for 10 years - you know better - blah blah blah"..... but in the meantime, I focus on what indicators or logic i can come up with the decide the next exit point..... all the while ACTING OUT the essentially unconscious FEELING of being stupid by letting the trade go further against me.
If I just admit to the feeling of stupidity right away, then I don't act it out and just get out and onto the next trade. For another trader, it might be that feeling or another unconscious emotional constellation but the process is one of detecting and dissecting in order to take away the force of the unconscious feeling and allow the mind to make free choices.
Does that help?
DKS