Some of his praise comes from his mouth. When Ahithophel speaks, everyone listens to him. And he says (2 Samuel 17:1-2), "Let me choose twelve thousand men and I will pursue David tonight. I will attack him while he is weary and weak." This advice pleased Absalom and all the elders of Israel. When David saw that everyone was with him and listening to him, he became afraid. God said to him, "Do not be afraid, I am with you. Cast your burden on the Lord and He will sustain you. He has a love for flesh and blood and those who come to Him." Once David prayed to Him and He answered him, but the second and third time He did not respond. But God is not like that. As long as you persist in calling upon Him, He will answer you. Therefore, cast your burden upon the Lord and He will sustain you.
The Friendship That Shattered David's World
Midrash Tehillim 55:3