There definitely seems to be a correlation between electrical stimulation of the brain and depression.
Despite the negative connotations of One Flew, electroshock therapy has remained a standby of mental health for treatment-resistant depression.
I learned this in a very roundabout way. My Dad had a late in life brain injury thought to have been caused by an undiagnosed case of meningitis that led to a seizure disorder.
Later in life, after he had had a seizure, he would go quite manic. Finally, a neurologist (who typically treat seizure disorders), referred him to a psychiatrist who explained that like an electro-shock treatment, a seizure was an electrical storm of the brain and that after a treatment or seizure, the brain had to "rewire" itself, and during that rewiring period, regions of the brain were more active than normal, eliminating depression. At least as far as it was understood. And that's a layman's understanding, but the psychiatrist said it doesn't go much deeper than that.
Dad wasn't depressed, and may have been very slightly bipolar in regular life (very sharp temper), and with elderly brain function, so during his post-seizure rewiring phase, would go a little manic-crazy.