If you're currently suffering from an untreated anxiety disorder, it's unlikely that you'll be able to quit until you first deal with that issue. Many folks with such disorders actually DO treat them, although unwittingly, by smoking (this is called 'self-medication'). This is not to say that you CAN'T quit until you deal with that primary issue- only that you ought to include a plan to treat your anxiety.
Breslau, N.; Kilbey, M., & Andreski, P. Nicotine dependence, major depression, and anxiety in young adults. Archives of General Psychiatry, 48. !2/1991; 1069-1074