I'm going to ignore the GAD bit because I don't believe in it as DSM defines it. but MDD - for a single episode you continue for 6 month following remission if you follow the guidelines. In practice, whatever the patient wants. For 2 episodes, the guidelines would say continue for 2 years (there is a 70% chance of relapse). For 3 episodes, the guidelines would say indefinitely as there is a 90% chance of relapse. Once you stop, chance of relapse is the same as if they never took an antidepressant, and in fact probably higher due to physiological and psychological dependence on the drug, which is a real phenomena. OTOH with CBT there is a significant reduction in risk of relapse for bout 2.5 years, and then risk of relapse increases to pre-therapy levels (which is why booster or maintenance sessions are a good idea). MBCT is also pretty good for reducing relapse in patients with recurrent depression. long-term psychodynamic therapy has been shown to continue to lead to improvements after the therapy has finished. In fact, most of the benefits of long-term therapy occur in the years following termination.
Let's face it, antidepressants are vastly overprescribed in the treatment of depression and many people continue on them for years. This, imho is why the chronicity of depression has increased in recent years (at least part of the explanation). Contrary to popular belief, the incidence of depression has been decreasing, but the prevalence of depression has been increasing (i.e. reduction in new cases of people becoming depressed, but fewer people are getting better). This is due to our flawed approach to the treatment of "depression" as if it were a "thing", a "disease" when it is neither.