BackgroundDepression is associated with inferior outcomes following hip or knee arthroplasty, though it remains unclear if this relationship is modifiable. This study examined the association between pharmacologic treatment of depression and patient-reported outcomes. MethodsThis retrospective cohort study of 1,651 total hip arthroplasty (THA) and 1,792 total knee arthroplasty (TKA) procedures between October 2012 and June 2019 used institutional registry data linked to nationwide pharmaceutical claims. The primary outcome was the Western Ontario and McMaster Universities Osteoarthritis Index (WOMAC) global score, with pain and function sub-scales assessed as secondary outcomes. The TKA and THA patients were analyzed separately via mixed-effect linear regression to compare patients who had depression treated with antidepressants (TKA, n = 210; THA, n = 150) to those who had untreated depression (TKA, n = 43; THA; n = 50), and those who did not have depression (TKA, n = 1,539; THA, n = 1,451). ResultsAmong patients who had depression, not receiving preoperative antidepressant therapy was associated with smaller improvements in WOMAC global scores (TKA, adjusted mean difference [MD]: -13.1 points, 95% CI [confidence interval]: -21.4 to -4.8; THA, MD: -8.5 points, 95% CI: -15.7 to -1.2) at two years after surgery, but not at one year (TKA, MD: -5.4 points, 95% CI: -12.9 to 2.1; THA, MD: -6.3 points, 95% CI: -12.9 to 0.3). Those who did not have depression had similar improvements in WOMAC global scores to those who had treated depression at both one (TKA, MD: 0.8 points, 95% CI: -2.7 to 4.4; THA, MD: 1.8 points, 95% CI: -1.8 to 5.4) and two years (TKA, MD: -1.1 points, 95% CI: -4.9 to 2.7; THA, MD: -1.6 points, 95% CI: -5.6 to 2.3). The findings were consistent with secondary outcomes. ConclusionAmong patients who have depression, antidepressant therapy before TKA or THA is associated with improved outcomes. Additional studies are needed to establish the impact of interventions to address untreated depression before surgery.