I’m going to love you no matter what

I’ve been trying the thought “I’m going to love you no matter what” to break the cycle of overeating, loathing myself, gaining weight, overeating.. Etc. I am hoping to make myself feel safe and like the choice will be fine either way. Is this a recommended method? I feel like I’ve been planning perfect eating days and then rebelling against my plans and hating myself for it. I can’t seem to get back on track and hoping this can help. Is it considered a good bridge thought?