OBJECTIVE: To compare bariatric surgery outcomes according to preoperative mental illness category. METHODS: Electronic health record data from several US healthcare systems were used to compare outcomes of four groups of patients who underwent bariatric surgery in 2012 and 2013. These included the following: people with (1) no mental illness, (2) mild-to-moderate depression or anxiety, (3) severe depression or anxiety, and (4) bipolar, psychosis, or schizophrenia spectrum disorders. Groups were compared on weight loss trajectory using generalized estimating equations using B-spline bases and on all-cause emergency department visits and hospital days using zero-inflated Poisson and negative binomial regression up to 2 years after surgery. Models were adjusted for demographic and health covariates, including baseline healthcare use. RESULTS: Among 8,192 patients, mean age was 44.3 (10.7) years, 79.9% were female, and 45.6% were white. Fifty-seven percent had preoperative mental illness. There were no differences between groups for weight loss, but patients with preoperative severe depression or anxiety or bipolar, psychosis, or schizophrenia spectrum disorders had higher follow-up levels of emergency department visits and hospital days compared to those with no mental illness. CONCLUSIONS: In this multicenter study, mental illness was not associated with differential weight loss after bariatric surgery, but additional research could focus on reducing acute care use among these patients.