After a lot of searching, I managed to find a single study investigating the effects of a ketogenic diet on depression in humans. Its loneliness in the literature was not lost on its author:
It is surprising, after so much clinical experience spanning a period of two thousand years, that this paper is the first [and last] by a psychiatrist describing the applications of the ketogenic diet in the treatment of anxiety, depression, and dysperception. Meanwhile, throughout this most advanced society of ours, in every modern psychiatric facility patients are exposed to an overdose of carbohydrates... It is time that the application of available knowledge in this field should be the rule rather than the exception. Ignorance and fear of controversy are no longer an excuse to withhold this basic and physiologically-oriented treatment from our patients.
In addition, there is one other study, perhaps better designed and conducted than the one above, observing similar results from the same treatment, but in rats. The near-absence in medical literature of what looks like a pretty obvious conclusion, given the evidence, is disappointing and almost surprising. There's no shortage of informal discussion in online forums, blogs and so forth about this phenomenon, but serious treatment is conspicuously scarce in peer-reviewed medical journals.
All the available evidence seems to point to dietary carbohydrates as the major causal factor in endogenous depression, but the specific reasons are elusive. As you might expect, all this is really complicated. For example, reducing dietary carbohydrates almost necessarily means increasing intake of something else, usually fat. It also means reducing serum insulin levels, losing weight, and a pile of other things, any or all of which might be relevant to depression. So do carbohydrates directly cause depression? Is it the insulin secreted in response to elevated blood sugar from carby meals? Is it the lack of dietary fat in high-carbohydrate diets, as suggested here? The lack of vitamin D? Is it caused by insulin resistance, diabetes, obesity?
Some of these ideas can apparently be ruled out in at least some cases, but the entire body of available evidence speaks with a single voice: either directly or indirectly, increases in carbohydrate intake increase both the risk and severity of depression with remarkable consistency. Given that, we would expect - and we do find - that reducing carbohydrate intake has the opposite effect. Taken to its logical conclusion, these facts suggest that a ketogenic diet would be a fantastically effective treatment for depression. Very little research has been done to confirm this, but what is available appears to be a strong confirmation of everything else we know.
Conclusion: dietary carbohydrates are the major cause of clinical depression, and a ketogenic diet presents itself as an ideal treatment.