Objective. To examine whether cognitive behavioral therapy (CBT) alleviates dysfunctional eating (DE) patterns and symptoms of anxiety and depression in morbidly obese patients planned for bariatric surgery. Design and Methods. A total of 98 (68 females) patients with a mean (SD) age of 43 (10) years and BMI 43.5 (4.9) kg/m were randomly assigned to a CBT-group or a control group receiving usual care (i.e., nutritional support and education). The CBT-group received ten weekly intervention sessions. DE, anxiety, and depressionwere assessed by the TFEQR-21 andHADS, respectively.Results.Comparedwith controls, the CBT-patients showed significantly less DE, affective symptoms, and a larger weight loss at follow-up. The effect sizes were large (DE-cognitive restraint, g = −.92, P ≤ .001; DE-uncontrolled eating, g = −.90, P ≤ .001), moderate (HADS-depression, g = −.73, P ≤ .001; DE-emotional eating, g = −.67, P ≤ .001; HADS-anxiety, g = −.62, P = .003), and low (BMI, g = −.24, P = .004). Conclusion.This study supports the use of CBT in helping patients preparing for bariatric surgery to reduce DE and to improve mental health. This clinical trial is registered with NCT01403558.