Have you spoken to your doctor about it?
There are certain guidelines for weight loss surgery, and your BMI is high enough to qualify, but there's more that goes into this decision than that.
Before making this decision, you should work with your doctor to determine if you are healthy enough for surgery. You should also absolutely work on any emotional issues that might be driving you to overeat, or any physical causes of it, before doing the surgery, or you are setting yourself up to fail. Surgery isn't at all an easy fix - it's hard, physically and emotionally, and if you don't address any underlying issues beforehand, they won't magically be fixed by surgery.
So talk to your doctor. Get a physical and go from there. Good luck!!