The critical factors I identified were a public commitment to stop smoking and a definite future date to quit.
Having the date set in advance, a few months away, gives you time to mentally prepare yourself, gets you used to the idea of becoming a non-smoker, and adds a very helpful fallback of "I really want to smoke, but I'm not going to throw away all those months of effort".
Making a public commitment (i.e. telling everyone who'll listen that you'll be quitting on [date]) makes your quitting date a bit more important, meaningful and harder to change your mind about as it approaches. It also increases the cost of recidivism: you'd have to admit you failed.
My doctor was one of the people I told about my intention to quit. He offered to prescribe a course of Zyban and I believe it made a huge difference. Just make sure you find out how long you're supposed to take the Zyban before quitting, and start taking it sufficiently in advance of quitting day.
Good luck!