Nothing so positions you before God to obtain mercy and grace like fasting combined with prayer.

Then the word of the LORD of hosts came to me saying, “Thus says the LORD of hosts, ‘The fast of the fourth, the fast of the fifth, the fast of the seventh, and the fast of the tenth months will become joy, gladness, and cheerful feasts for the house of Judah; so love truth and peace.’ “Thus says the LORD of hosts, ‘It will yet be that peoples will come, even the inhabitants of many cities. ‘And the inhabitants of one will go to another saying, “Let us go at once to entreat the favor of the LORD, and to seek the LORD of hosts; I will also go.” ‘So many peoples and mighty nations will come to seek the LORD of hosts in Jerusalem and to entreat the favor of the LORD.’ “Thus says the LORD of hosts, ‘In those days ten men from all the nations will grasp the garment of a Jew saying, “Let us go with you, for we have heard that God is with you.”

Zechariah 8: 18-23

Then I proclaimed a fast there at the river of Ahava, that we might humble ourselves before our God to seek from Him a safe journey for us, our little ones, and all our possessions. For I was ashamed to request from the king troops and horsemen to protect us from the enemy on the way, because we had said to the king, “The hand of our God is favorably disposed to all those who seek Him, but His power and His anger are against all those who forsake Him.” So we fasted and sought our God concerning this matter, and He listened to our entreaty.

Ezra 8: 21-23

And they said to me, “The remnant there in the province who survived the captivity are in great distress and reproach, and the wall of Jerusalem is broken down and its gates are burned with fire.” Now it came about when I heard these words, I sat down and wept and mourned for days; and I was fasting and praying before the God of heaven.

Nehemiah 1: 3-4

“And whenever you fast, do not put on a gloomy face as the hypocrites do, for they neglect their appearance in order to be seen fasting by men. Truly I say to you, they have their reward in full.  “But you, when you fast, anoint your head, and wash your face so that you may not be seen fasting by men, but by your Father who is in secret; and your Father who sees in secret will repay you.

Matthew 6: 16-18