After the Lord's Prayer (really, the model prayer or disciples' prayer), Jesus then addresses humble fasting. Fasting is the humbling of the soul before God through the deprivation of food for a time. Christians do this to seek God, to meditate on His Word, and to pray.
Our Lord shows that to put on a show and present ourselves as humble by neglecting our appearance when we fast (or do anything spiritually) is the opposite of true humility. In pretending genuine faith, we actually deny the humble Christ who bought us through His utter and complete humiliation on the cross.
It is the hope of the Gospel within us that drives us to joy even through the humbling of our bodies. This happens whether we plan a fast or whether the Lord takes us through difficult times. We don't go out of our way to pretend over-the-top happiness when we're suffering. Yet we do everything we can to show others Christ and not ourselves.