There was an article in my local newspaper earlier this week (not in English, sorry) about how prospective patients for gastric bypass were hiding any mental health issues they had, because they were afraid they' be refused the surgery. This was a follow up article to a previous one on how recent research showed that roughly 50% had mental health issues worsen or arise after surgery. Some had eating disorders that weren't caught before, or developped them after. Some had used eating as therapy for underlying issues, and were now without their coping mechanism.
I guess it is important to figure out why you're overweight before surgery - is it body chemistry such as insulin resistance, or is it genetics? Is it your way of eating, what you eat or why you eat? That way you will know what kind of additional help you will need pre- and post surgery.
A friend of mine has had great success with bariatric surgery. Her whole family struggles with weight, and she lost both her parents early because of obesity-related complications. She needed the physical restriction on the amount she ate. Changing her eating habits, which she learned as she grew up, was more than she could do through will power alone.