Fasting is linked to repentance, which we see in the example of Israel’s King David. When David should have been leading his army into battle, he instead had an adulterous affair with one of his soldier’s wives and then put the soldier in a position in the battle that meant certain death. He then covered it all up, hoping that no one would find out. David then took the woman to be his wife, she became pregnant, and the prophet Nathan declared that the child would not live. The baby became sick, and David prayed and fasted before God for seven days. He saw his helpless infant son suffering of no fault of the child's own, and it broke David's heart. The baby died, and immediately David went to the temple and worshiped. He then cleaned himself up and broke his fast.
In Psalm 51 we read David's prayer when he was confronted with his sin. He had significantly transgressed and crossed a moral line. He poured out his heart before the Lord, crying out to God for cleansing and forgiveness. It was true repentance, brought on by prayer and fasting. There’s a difference between repentance and remorse. Many times, when we’re caught in sin like David was, we are remorseful that we got caught. We are remorseful for how our actions affect our own lives, our reputation, and our sense of self-worth. Remorse is about you. But repentance realizes that your sin has been against God and God only. A repentant heart seeks to restore the broken relationship between you and God.
If you are trying to break a repeated pattern of sin in your life, I dare you to fast. Allow God to break through the hardened heart your sin has produced. Your fast can sensitize your spirit and create a broken and contrite heart. Allow your fast to create repentance and be restored in your relationship with Jesus.