In Isaiah 58 (read the whole chapter, its short) God is telling the Israelites the same thing. They tell God,
3. ‘We have fasted before you!’ they say. ‘Why aren’t you impressed? We have been very hard on ourselves, and you don’t even notice it!’
His response is,
“It’s because you are fasting to please yourselves. Even while you fast, you keep oppressing your workers. 4. What good is fasting when you keep on fighting and quarreling? This kind of fasting will never get you anywhere with me.
God then goes on to explain that freeing those that are wrongly imprisoned, sharing food with the hungry and giving shelter to the homeless is the type of “fasting” that pleases Him. In other words, thinking about other people more than ourselves.
Paul, in Philippians 2:3 (NASB) says something similar,
3. Do nothing from selfishness or empty conceit, but with humility of mind regard one another as more important than yourselves;
And the Lord promises that when our hearts are right…
8. “Then your salvation will come like the dawn, and your wounds will quickly heal. Your godliness will lead you forward, and the glory of the LORD will protect you from behind.
9a. Then when you call, the LORD will answer. ‘Yes, I am here,’ he will quickly reply.
10a. Then your light will shine out from the darkness, and the darkness around you will be as bright as noon.
Seek first the Kingdom of God and His righteousness…
Love God. Love each other
…and all these things shall be added unto you. Matthew 6:33