Nicotine has a very long history of medicinal use. Even now researchers are studying nicotine for its potential to treat a wide range of psychological conditions from alzheimer's to depression, to schizophrenia.
Note the careful use of the word potential.
The problem with nicotine and depression is that while the substance treats the symptoms, dependency on the substance exacerbate the same symptoms they're treating. And a natural tolerance builds up to the chemical.
The rewarding effects are immediate, but the negative effects are slow and accumulating. Whether the rewarding effects allow you to make progress to counter the side effects, who knows. But anyways... It's a double-sided coin and you can't definitively say "smoking is bad for depression". Although in most cases I'd bet it probably doesn't help the overall picture of treatment and recovery.
I'll say this though... The nicotine patch does make a difference in quitting. I went 5-6 years reluctant to use those patches because I didn't think they made much sense, I tried the gum several times and it didn't work, and the fact that gums and patches are easy ways to bypass nicotine advertisement laws and laws about selling nicotine to minors, I was pretty convinced they were just profitable scams in cooperation with tobacco corporations. Anyways... I tried it... The program says it's a 3 step program over 10 weeks. I quit using the patches, and cigarettes, completely, after about 1-2 weeks on step 1. So if you really want to quit but can't, it's worth a try, but you have to really want to do it.