Chronic pain contributes significantly to the current opioid epidemic. Up to 20% of postoperative patients develop chronic postsurgical pain (CPSP). CPSP is highly associated with chronic opioid use and dependence, and yet routine multimodal analgesia as a combination of acetaminophen, NSAIDs, and anti-neuropathic agents is only moderately effective in preventing CPSP. The incidence for CPSP is particularly high in patients undergoing mastectomy or breast conserving surgery with lymph node dissections (25-60%). This specific postsurgical pain condition is known as post-mastectomy pain syndrome (PMPS), and a recent study showed that 1 in 10 patients continue to use opioids 3 months after surgery. We aim to study the effectiveness of perioperative ketamine for the prevention of PMPS, within the NIH HEAL Pain Management Effectiveness Research Network (Pain ERN). Our rationale is that ketamine can reduce key risks for CPSP including acute pain severity, anxiety and depression, and pain catastrophizing, and in doing so can prevent the development of PMPS. Mechanistically, ketamine is known to enhance endogenous cortical control of pain and mood. There is strong clinical evidence for perioperative ketamine infusion in reducing postsurgical pain, and for a single ketamine bolus (0.3-0.5mg/kg) to treat depression and anxiety associated with postsurgical pain. However, studies are urgently needed to test the efficacy of ketamine in the perioperative period for preventing CPSP, particularly PMPS, in a large cohort of patients and to assess clinical variables predictive for chronic pain severity and for treatment effects. We aim to conduct a multi-site, three-arm RCT to study the effectiveness of ketamine in reducing the incidence and severity of PMPS. 750 patients after mastectomy or breast conserving surgery with lymph node dissection will be randomized to receive either a standard continuous ketamine infusion starting after induction (bolus of 0.35mg/kg followed by infusion at the rate of 0.25mg/kg/hr) and continued for 3 hours after surgery, a regimen of single-bolus ketamine (0.6mg/kg) administered right after surgery, or placebo (saline) control. To maintain the pragmatic nature of an effectiveness trial, all patients will receive routine postoperative multimodal analgesia. Compatible with recent NIH recommendations, we will assess pain, function and mood over 12 months after surgery. We will use Brief Pain Inventory (BPI) severity score at 3 months after surgery as primary endpoints. Secondary endpoints include pain incidence, BPI, shortform McGill's Pain Questionnaire, opioid use, NIH PROMIS scales, Hospital Anxiety and Depression Scale, Pain Catastrophizing Scale, and Breast Cancer Pain Questionnaire. We will also build precision medicine models to analyze clinical variables associated with CPSP and with success of ketamine treatment. Agreements have been reached with 11 sites, including 7 Clinical and Translational Science Awards (CTSA) hubs, NYU, Columbia, Einstein, BWH, Washington University at St. Louis, Duke, and Univ. Washington, to carry out this study successfully.