Depressive symptoms are common among perimenopausal women with breast cancer having modified radical mastectomy. Esketamine exerts antidepressant effects. This study aims to assess whether an intraoperative sub-anesthetic dose of esketamine prevents postoperative depressive symptoms in these patients. In this randomized, triple-blinded, placebo-controlled trial, we will enroll 130 perimenopausal women (aged 45-60 years) with breast cancer undergoing unilateral modified radical mastectomy. Patients will be randomly assigned with a 1:1 ratio to receive either esketamine (0.25 mg/kg i.v.) or normal saline after anesthesia induction and before skin incision. The primary outcome is the incidence of depressive symptoms at day 30 postoperatively, assessed using the Beck's Depression Inventory (BDI). Secondary outcomes include incidence of depressive symptoms and BDI scores at day 1, 3, and 180 postoperatively, anxiety symptoms and scores at day 1, 3, 30, and 180 postoperatively, pain intensity and quality of recovery at day 1 and 2 postoperatively, nausea and vomiting within 48 hours postoperatively, length of postoperative hospital stay, and cancer-specific outcomes. Data will be analyzed in the modified intention-to-treat population. This is the first trial to evaluate the effects of a sub-anesthetic dose of esketamine on depressive symptoms in perimenopausal women after modified radical mastectomy. The results of this study will help to improve their mental health and recovery after breast cancer surgery. Chinese Clinical Trial Registry (ChiCTR2200064348).