you need to replace the habit with another...
everytime you feel the urge to smoke, drink water until you're full and your stomach starts hurting a little...
keep this up religiously, pretty soon, thinking about smoking will get the idea of water in your head, and your stomach will feel sick...