The same is true for any kind of fasting. If you fast from salt because your doctor told you to, you won't last too long with just your good intentions. You have to mean it. You have to sincerely want to be healthy.
Hence, the purpose of fasting is conversion. If fasting is for spiritual reasons then you need to convert your heart. If fasting is for health reasons then you need to convert your bad habits.
Either way, that conversion requires self discipline. And there's the rub. That's what it all comes down to. Have you got what it takes? Spiritually, it's the age old battle between soul and body. Our bodily "wants" can drive us crazy. And unfortunately, the desires sometimes win. The trick is perseverance. Losing one battle does not lose the war. Victory is achieved by overcoming the losses. Those bodily cravings constantly want control. Who's the boss? You or your body? Every time you try to fast, you win. You may give in, but the fact that you wanted to fast, that you are not going to get discouraged, that you are going to try again, makes you the winner. Saying "no" to the body help you to assert dominance. Your "will" will be strengthened and you will be freer. Only death will make you completely free, but until then you must dominate. Keep at it. And this struggle, and the need for perseverance applies to both the body and the soul.