I'm addicted to smoking. How can I stop?

I'm planning to have baby, so I have to quit smoking - but it's hard. Sometimes it's not a physical need, it's mental.I cannot help myself from not thinking about smoking. What can I do to get rid of this addiction?