Everyone falls off the wagon with doing the things they know are healthy for them, and doing too much of things that they know are unhealthy for them. Sometimes these behaviors go on long enough to result in a serious health condition or crisis. It can often be hard to forgive yourself for lapses in your self-care, particularly when they result in serious health consequences, or damage to other areas of your life.
What people tend to forget, or just aren't aware of, is that there is usually some very good reason deep inside of you for engaging in "self-sabotaging" behavior. The weirdest part of it is that that reason is usually rooted in love, even though it may look like anything but! Behind every "no" is a "yes" to something else often more unconscious. On some level, you are seeking to protect and care for yourself, which is actually quite self-loving. There is just a discrepancy between the intention of the behavior and it's actual impact.
In any case, even (and especially) in the most devastating circumstances, there is always something to be learned from what you are going through that will add to your soul's wisdom (or whatever you want to call it). I can't explain exactly why life works that way, but there is an exquisite beauty in the process of healing from the darkest experiences in your life that you could not have known and appreciated without having first experienced that darkness.
Maybe if you were born an absolute saint, then you might have never experienced any sort of transgressions or blocks around how to best love and nourish yourself... be they related to your diet, self-care, or otherwise. However, I honestly don't believe that that sort of saint has ever existed because even saints only become saints by integrating and applying the wisdom of accumulated life experience. Experience which invariably involves some transgressions from a healthy lifestyle from time to time.
The good news is that you always have the choice to start fresh, right where you are now. To take an honest look at your life and begin making different choices and seeking appropriate help. Whatever is happening, you can accept it and begin to love and heal yourself. You may or may not fully recover physically, but you can always recover at the level of your soul.
Much love to you always,