Struggling with my weight

I wish I didn't care how much I weighed/was comfortable with it, or I wish I could lose ten pounds. There is no inbetween. I'm 16, 5'6", and weigh 140lbs as of today. Earlier this week I weighed 135. I hate myself for gaining this weight and it depresses me so much. Why do I have to think this way? Why does having fat bother me so much? One of my worst fears is being bigger than my boyfriend because we're the same height and roughly the same weight. I eat healthy 24/7 and then three days in a row I have brownies or pie or cookies and boom, I gain it all back. It's awful. I need hope to continue my weight loss journey before I break down and forget about it. Why do I have to be this way???