Eligibility Criteria:
Inclusion Criteria:
For Direct-Entry Participants
* At the time of signing the informed consent form (ICF), participant must be a man or woman 18 (or older if the minimum legal age of consent in the country in which the study is taking place is greater than \[\>\]18) to 64 years of age, inclusive - At the start of the screening/prospective observational phase, participant must meet the Diagnostic and Statistical Manual of Mental Disorders (DSM-5) diagnostic criteria for single-episode major depressive disorder (MDD) (if single-episode MDD, the duration must be greater than or equal to \[\>=\] 2 years) or recurrent MDD, without psychotic features, based upon clinical assessment and confirmed by the Mini-International Neuropsychiatric Interview (MINI)
* At the start of the screening/prospective observational phase, participant must have an Inventory of Depressive Symptomatology-Clinician rated ( IDS-C30) total score of greater than or equal to (\>=) 34
* At the start of the screening/prospective observational phase, participants must have had nonresponse (less than or equal to 25 percent \[%\] improvement) to greater than or equal to (\>=1) but less than or equal to (\<=) 5 oral antidepressant treatments taken at adequate dosage and for adequate duration, as assessed using the Massachusetts General Hospital (MGH-ATRQ )
* MGH-ATRQ and documented by medical history and pharmacy/prescription records, for the current episode of depression. In addition, the participant is taking different ongoing oral antidepressant treatment (on the MGH-ATRQ) for at least the previous 2 weeks at or above the minimal therapeutic dose
* The participant's current major depressive episode, depression symptom severity (Week 1 MADRS total score \>=28 required), and treatment response to antidepressant treatments used in the current depressive episode (retrospectively assessed) must be deemed valid for participation in a clinical study based on a Site-Independent Qualification Assessment For Transferred-Entry Participants
* The participant must have completed the double-blind induction phase in ESKETINTRD3001 or ESKETINTRD3002 and must have demonstrated response at the end of that phase (\>=50% reduction in the MADRS total score from baseline \[Day 1 pre-randomization\] at the end of the 4-week double-blind induction phase)
Exclusion Criteria:
* Participants who have previously demonstrated nonresponse of depressive symptoms to esketamine or ketamine in the current major depressive episode, to all 4 of the oral antidepressant treatment options available for the double-blind induction phase (ie, duloxetine, escitalopram, sertraline, and venlafaxine extended release \[XR\]) in the current major depressive episode (based on MGH-ATRQ), or an adequate course of treatment with electroconvulsive therapy (ECT) in the current major depressive episode, defined as at least 7 treatments with unilateral/bilateral ECT
* Participant has received vagal nerve stimulation (VNS) or has received deep brain stimulation (DBS) in the current episode of depression
* Participant has a current or prior DSM-5 diagnosis of a psychotic disorder or MDD with psychotic features, bipolar or related disorders (confirmed by the MINI), obsessive compulsive disorder (current only), intellectual disability (DSM-5 diagnostic codes 317, 318.0, 318.1, 318.2, 315.8, and 319), autism spectrum disorder, borderline personality disorder, antisocial personality disorder, histrionic personality disorder, or narcissistic personality disorder
* Participant has homicidal ideation/intent, per the investigator's clinical judgment, or has suicidal ideation with some intent to act within 6 months prior to the start of the screening/prospective observational phase, per the investigator's clinical judgment or based on the Columbia Suicide Severity Rating Scale (C-SSRS)
* Participants with history of moderate or severe substance or alcohol use disorder according to DSM-5 criteria