Antidepressants, specifically serotonergic antidepressants such as SSRIs and SNRIs, work to relieve both anxiety and depression. The reason is that SSRIs and SNRIs block the reuptake of serotonin into the presynaptic neuron, thereby increasing the concentration of serotonin in the synapse and hence increases the binding of serotonin to postsynaptic neurons.
For anxiety, SSRIs and SNRIs work by increasing serotonin to the amygdala, which calms the amygdala and the rest of the anxiety circuit, and hence decreases anxiety. For depression, SSRIs and SNRIs work by increasing serotonin in the synapse, hence increasing binding to serotonin posrtsynaptic receptors, and this leads to a downregulation of serotonin receptors. This then leads to downstream effects in the postsynaptic neuron, and leads to the eventual lifting of the depression weeks later.