Electroconvulsive therapy (ECT) is a medical treatment most commonly used in patients with severe major depression or bipolar disorder that has not responded to other treatments. ECT involves a brief electrical stimulation of the brain while the patient is under anesthesia.