The investigators will evaluate the cognition function and electroencephalographic patterns that accompany the recovery from ECT and general anesthesia. Twenty patients with refractory depression will be randomized in this interventional single-blinded randomized crossover trial. Each patient will complete seven study visits. The first visit will be conducted during the dose-charge titration ECT treatment with etomidate anesthesia. After this session, patients will be randomized to three sessions each week for two weeks (six treatments total). Over the first week patients will be randomized in order for three treatment arms: (1) etomidate general anesthesia and ECT, (2) ketamine general anesthesia and ECT, and (3) ketamine alone. Patients will be blinded to the treatment arm for each session. Baseline and post-treatment measurements of cognition and ECT will be acquired on each of the six treatment sessions.