The two may have similar effects on body physiology and appearance but they are worlds apart spiritually and theologically. One is spiritual in nature, the other is purely physical.
The primary motivations behind dieting are usually exclusive of God and in some cases, vain and self-indulgent, i.e. the quest for greater beauty and attractiveness. Other times the motivations may be reasonable in and of themselves, such as the desire for improved health or the need to ward off a heart attack but they are focused on self and the important thing is the end; i.e. weight loss.
Fasting, on the other hand, is unconcerned with the physical side effects and the end is not weight loss. The principal and essential ingredient is self-denial. The war against the flesh; the establishment of command over one's senses and appetites. The imitation of Jesus and the following of the Lord's command to deny oneself, take up one's cross and follow Him. One's weight and appearance at the end of this process is irrelevant.
Jesus, prior to the start of his public ministry, went into the desert and fasted for 40 days and forty nights. He did not diet so he'd look good in his tunic.
In fasting, the intention is everything because God sees our hearts.
Excellent observations.