Make a list of good ways you can distract yourself. Try them out before you quit. Save the list. Then when you quit and get an urge, you can immediately choose something from the list.