Inclusion Criteria:  Has inadequate response to at least 1, but no more than 2 antidepressant treatments during the current major depressive episode including their current antidepressant fluoxetine or escitalopram (SSRI). Inadequate response is defined as less than (<) 50 percentage (%) symptom reduction after adequate antidepressant treatment for at least 6 weeks at the minimum therapeutic dose, with at least 4 weeks at the optimal dose prior to screening Has had at least 6 sessions of psychotherapy in this episode prior to randomization Must have Children's Depression Rating Scale-Revised (CDRS-R) total score greater than or equal to (>=) 48 at the beginning of screening with no more than a 25% improvement during screening Participants weighing between fifth and ninety-fifth percentile for age and sex. Obese participants greater than ninety-fifth percentile and underweight participants below fifth percentile may participate following medical clearance, as long as their baseline weight is >=30 kilograms (kg) A female participant of childbearing potential must have a negative urine pregnancy test at screening and baseline  Exclusion Criteria:  Has a history of liver or renal insufficiency, significant cardiac (example, congenital heart disease, cardiomyopathy, or tachyarrhythmias), vascular, pulmonary, gastrointestinal, endocrine (including uncontrolled hyperthyroidism), neurologic (including seizure disorder), hematologic, rheumatologic, psychiatric, or metabolic disturbances. Stable medical conditions are allowed Has history or current diagnosis of psychotic disorder, bipolar disorder, conduct disorder, intellectual disability, autism spectrum disorder, borderline personality disorder, somatoform disorders, or fibromyalgia Has a significant primary sleep disorder (example, obstructive sleep apnea, parasomnias) confirmed by polysomnography (PSG) assessment at screening for participants in subgroup, but participants with insomnia or hypersomnia disorders are allowed At significant risk of committing suicide based on history or according to the investigator's experience, or based on active suicidal ideation, intent or plan, item 4 or 5 of the Columbia-Suicide Severity Rating Scale (C-SSRS) within the past 3 months or a history of suicidal behavior within the last 6 months Has known allergies, hypersensitivity, or intolerance to seltorexant or its excipients