A lot of people struggle with depression or anxiety when quitting, it's sadly par for the course for them. Of course there is the obvious reason, letting go of something that most have thought as being a major coping and comfort mechanism. But I think that nutrition and vitamin deficiency plays a huge part and adding just a few supplements and maybe improving ones diet a little can bring relief relatively quickly.
The supplements to maybe look into are: Vitamin B complex , Magnesium, and 5-HTP. Some other one's that help are St. Johns Wort, Kava kava, and in the winter time Vitamin D. Improving one's diet is huge, too, adding more raw foods. Eating oatmeal can be super calming, too. Poor diet, smoking, and drinking make the body very acidic and it's the perfect breeding ground for disease. Just small changes can make a huge shift but if one wants to do just one thing, I'd say get a good Vit B complex. (vitamin code raw B complex is the best one I've tried).
The psychological letting go takes some time, it takes reprogramming of ones thinking and learning new coping strategies. One of the best coping strategies being exercise. Most folks on here that have maintained their quits easily have started some form of exercise. Of course there are tons of other stress relieving strategies that can help with depression and anxiety. Tons of info online but one thing talked about a lot on the forum is 'knowledge is power'. The more informed one is, the easier to move through the stages of a quit.
We all know that we should exercise and eat better..... it's hard to do sometimes, especially when feeling depressed or anxious... but the point is that there are things that can make things easier. Hope something in here is useful for someone struggling.