Do something to distract yourself, and occupy your hands. My Dad quit smoking by playing with a Rubik's Cube. I lost weight by playing guitar.
After you've learned to control the nicotine cravings, smokers often have trouble with cravings for hand-mouth gestures that have become strong habits, and that often leads to relapse. Something that occupies the hands can help keep that from happening.