You're taking a step in the right direction in realizing that this is problematic thinking. A lot of people can't get over that big hurdle and participate in the behaviors you describe but can justify them. Good for you for knowing this isn't right.
Your post sounds like bulimia, binge-eating disorder, probably coupled with some anxiety and/or obsessive-compulsive issues (we all have these to a certain degree). You need to seek professional assistance and the best place is probably with your family doctor or primary care physician. If you feel more comfortable with your ob/gyn then go that route. Either way, the doctor will be able to guide you to the best course of treatment. Your doctors are part of your total health team so consult with them and use them to their fullest extent!
What you describe is actually an illness. I honestly don't mean to sound negative at all. Many people suffer from forms of disordered eating so know that you are definitely not alone! The good thing is that there are actually great programs, therapists, counselors, and doctors who can help treat your issues.
Please don't feel ashamed one bit about seeking medical help for this. If you broke your arm or if you had cancer, you'd seek medical assistance without a doubt - you wouldn't try to set a broken bone or cure cancer on your own, right? The same should hold true for mental health issues.
You deserve to be happy and healthy, so please give yourself this gift of healing. Through the process, you'll learn about what triggers the behaviors, techniques to help yourself choose alternate forms of coping without bingeing, and healthy ways to lose/manage your weight.
Give it a chance - you'll probably feel a great sense of relief once you get on the right track. I wish you nothing but the best of luck!