I really wish there would be a bigger discussion in our society about chronic depression and generalized anxiety disorders. These conditions are largely influenced by genetics/brain chemistry, and resurface throughout a sufferer's lifetime, often exacerbated in times of stress (whether physical stress or emotional/situational stress). The common analogy is to diabetes, but I try to think of it more along the lines of a chronic viral infection that won't go away. The symptoms aren't always apparent but the underlying cause is always there, and will flare up from time to time.
Ongoing treatment and developing strategies for support/treatment when symptoms flare is key. It is much easier to treat an emerging depressive spell before it progresses to the point where you can't cope with day to day activities, but our society talks so much about "sucking it up" and "fake it until you make it". That type of thinking really isn't effective or helpful when it comes to chronic anxiety and depression.
Find a therapist and treatment team (and medications, if appropriate) and build up coping skills/support for when the conditions inevitably flare up again.