Since you mention several of these episodes weeks apart, a few possible diagnosis come to my mind:
One possible diagnosis for a person with these symptoms could be (rapid cycling) bipolar disorder. While bipolar disorder is often associated with people experiencing very noticeable episodes of mania, bipolar disorder can also present with "hypomania" a less severe form of mania where the patient feels good and productive.
Bipolar disorder comes in several forms. One is rapid cycling bipolar disorder is characterized by more then 4 cycles of mania/hypomania and depression per year. Another is bipolar 2, which often presents with hypomania instead of mania.
Another possible diagnosis is dysthymia, which is a mild, but chronic form of depression occurring for more than 2 years. Mild in this case does not mean that symptoms such as suicidal thoughts are not present, and the severity of symptoms can vary over the course of the disease, often with external influences.
Dysthymia symptoms usually come and go over a period of years, and their intensity can change over time. But typically symptoms don't disappear for more than two months at a time
Another possible diagnosis would be cyclothymia, a sort of "mix" between the two.
In the end, only a therapist and/or a psychiatrist can make a useful diagnosis, but these are conditions that can show these symptoms and the therapist/psychiatrist would likely explore. (and as always with depressive episodes, excluding hypothyroidism is important)
Sources and further reading
Bipolar disorder, includes definitions for hypomania and rapid cycling bipolar disorder.
Dysthymia overview at the Mayo Clinic website