Your Father Loves You by James Packer, (Harold Shaw Publishers, 1986), page for June 14
In Scripture we see several purposes for fasting. It's part of the discipline of self-control; it's a way of sharing that we depend on God alone and draw all our strength and resources from him; it's a way of focusing totally on him when seeking his guidance and help, and of showing that you really are in earnest in your quest; it's also, at times, an expression of sorrow and deep repentance, something that a person or community will do in order to acknowledge failure before God and seek his mercy.
We tend to think of fasting as going without food. But we can fast from anything. If we love music and decide to miss a concert in order to spend time with God, that is fasting. It is helpful to think of the parallel of human friendship. When friends need to be together, they will cancel all other activities in order to make that possible. There's nothing magical about fasting. It's just one way of telling God that your priority at that moment is to be alone with him, sorting out whatever is necessary, and you have canceled the meal, party, concert, or whatever else you had planned to do in order to fulfill that priority.