Moreover when ye fast, be not, as the hypocrites, of a sad countenance: for they disfigure their faces, that they may appear unto men to fast. Verily I say unto you, They have their reward. But thou, when thou fastest, anoint thine head, and wash thy face; That thou appear not unto men to fast, but unto thy Father which is in secret: and thy Father, which seeth in secret, shall reward thee openly.Matthew 6:16-18
The question is not whether we should fast or not. Jesus assumes we understand that fasting is an important part of our discipleship and therefore teaches us the proper motivation for fasting.
But as for me, when they were sick, my clothing was sackcloth: I humbled my soul with fasting; and my prayer returned into mine own bosom.Psalm 35:13
Fasting is a humbling of the soul so that we may properly perform our duties to God and others. It also aids us in drawing closer to God because we depend on Him more when our body is hurting during the fast.
All the three duties Jesus mentions in Matthew 6 are matters of private devotion but the duty of fasting has an additional charge of secrecy. When the body is hungry, it will eventually alter its outward appearance involuntarily. Jesus teaches us that we should make every effort to hide this and keep our fasting private.
We certainly should not be announcing to others that we are fasting so they feel sorry for us! And, if fasting is to humble us, then why would we use it to promote ourselves as better than others?