Inclusion Criteria:  ≥18 years old. Montgomery-Åsberg Depression Rating Scale (MADRS) score ≥ 20 at screening and start of the first infusion. Voluntary admission for treatment of an acute depressive episode Meet DSM-5 criteria for a major depressive disorder or bipolar affective disorder (current episode depression). Diagnosis of a major depressive disorder or bipolar affective disorder (DSM-5) will be confirmed by the structured diagnostic Mini International Neuropsychiatric Interview (MINI; updated Version 7 for DSM-5).  Exclusion Criteria:  Current involuntary admission. Medical condition rendering unfit for ketamine/midazolam. Currently taking any of the contraindicated medications that may alter the pharmacokinetics of ketamine. Active suicidal intention. Dementia. History of Axis 1 diagnosis other than major depression. Electroconvulsive Therapy (ECT) administered within the last two months. Alcohol/substance dependence in previous six-months. Pregnancy, breastfeeding or considering becoming pregnancy whilst on the trial for up to 12 weeks after last dose or inability to confirm use of adequate contraception during the trial. Breastfeeding women.