Inclusion Criteria  A subject may be eligible for enrollment if all the following inclusion criteria apply within the thirty days prior to first experimental session:  Between the ages of 18 to 64 years old. Able to provide informed consent. Meet DSM-5 criteria for Major Depressive Disorder, without psychotic features based on clinical interview. Score at least 20 on the Montgomery-Asberg Depression Rating Scale (MADRS, moderate or severe depression). Must meet criteria for opioid use disorder in early or sustained remission criteria by DSM-5 based on clinical interview. Subjects taking other psychotropic medications (e.g. anti-depressants, anxiolytics, methadone, buprenorphine, naltrexone) must be maintained on a stable dose for at least four weeks before study initiation.  Exclusion Criteria  Subjects will be excluded from the study if any of the following criteria apply:  They are considered an immediate suicide risk by clinician assessment, self-reports a suicide attempt within the past year, or felt to be likely to require hospitalization during the study. Subjects who meet DSM-5 criteria for current bipolar disorder based on clinical interview. Subjects who meet DSM-5 criteria for current or history of psychotic spectrum disorders based on clinical interview. Subjects meeting DSM-5 criteria for current substance use disorder (i.e., not in early or sustained remission) other than tobacco use disorder. Subjects who report use of ketamine >20 times in the past or who meet DSM-5 criteria for Other Hallucinogen Use Disorder due to ketamine use including subjects who are currently in early or sustained remission. Women who are pregnant or nursing, and women who do not consent to use methods of highly effective birth control during the interventional phase of the study. Subjects with hypertension as defined by a baseline visit systolic blood pressure (SBP) >140 mmHg or a diastolic blood pressure (DBP) >90 mmHg. A history of allergic or other adverse reaction to ketamine (or its excipients). Clinically significant physical exam findings or self-reported medical conditions for which a transient increase in blood pressure could be significantly detrimental (e.g. glaucoma, aneurysmal disease, cardiovascular disease, or end-stage renal disease). QTc will be measured in all subjects and those with QTc 450ms or longer will be excluded. Subjects who live greater than 20 miles from the study site and cannot arrange their own transportation will be excluded from the study. Subjects with kidney or liver impairment.