Subjects will be inpatients at Sunnybrook Health Sciences Centre with a diagnosis of either MDD or BD type I or II currently depressed. To be included in the study, SI must be present at the time of baseline assessment. Subjects will be recruited on the first regular week day (non-weekend/holiday) after their admission. This is the day on which a comprehensive inpatient treatment plan is typically developed. Subjects will be randomized in a 1:1 double-blind fashion to two groups in both a MDD and a BD stream. That is, 13 subjects will be randomized to ketamine + TAU and 13 subjects will be randomized to midazolam + TAU in the stream for subjects with MDD. Likewise 26 subjects with bipolar depression will be randomized to these two treatments.