Must meet diagnostic and statistical manual of mental disorders (5th edition) (DSM-5) diagnostic criteria for major depressive disorder (MDD) based upon clinical assessment and confirmed by the mini-international neuropsychiatric interview for children and adolescents (MINI-KID)
Must have a clinical global impression - severity of suicidality - revised (CGI-SS-R) score of "Markedly" or greater (that is, greater than or equal to \[\>=\] 4) at both screening and baseline (predose) visits
Must have a children's depression rating scale - revised (CDRS-R) total score \>= 58 at baseline (predose)
In the physician's opinion, acute psychiatric hospitalization is clinically warranted due to subject's acute suicidality
Must be medically stable based on physical examination, medical history, vital signs, and 12-lead electrocardiogram (ECG) performed at screening
You may not be if
Participant has a current DSM-5 diagnosis of bipolar (or related disorders), intellectual disability, autism spectrum disorder, conduct disorder, oppositional defiant disorder
Participant currently meets DSM-5 criteria for borderline personality disorder
Participant has a current or prior DSM-5 diagnosis of a psychotic disorder, or MDD with psychosis
Participant has a history of seizure disorder
Participant has known allergies, hypersensitivity, intolerance or contraindications to midazolam, esketamine or ketamine, or their excipients
Clareo Health | A Study to Evaluate the Efficacy and Safety of Esketamine for Reduction of Symptoms of Major Depressive Disorder