In Bhagavad Gita Chapter 6 Verse 16, there is a mention about Fasts. Keeping fasts has been forbidden in Bhagavad Gita
It is stated in Gita 6.16 that 'O Arjun! This bhakti (worship) is neither successful of one who eats excessively, nor of one who does not eat at all, that is, neither this bhakti is successful of a person who keeps fasts, nor of someone who sleeps too much, nor of someone who remains awake a lot.'
Na, ati, ashnatH, tu, yogH, asti, na, ch, ekaantam’, anashnatH,
Na, ch, ati, swapnsheelasya, jaagrtH, na, ev, ch, Arjun ||16||
It is completely forbidden in this Gita verse to keep fasts.