22 So David and all the people who were with him arose and crossed over the Jordan. By morning light not one of them was left who had not gone over the Jordan. 23 Now when Ahithophel saw that his advice was not followed, he saddled a donkey, and arose and went home to his house, to his city. Then he put his household in order, and hanged himself, and died; and he was buried in his father's tomb. 24 Then David went to Mahanaim. And Absalom crossed over the Jordan, he and all the men of Israel with him. 25 And Absalom made Amasa captain of the army instead of Joab. This Amasa was the son of a man whose name was Jithra, an Israelite, who had gone in to Abigail the daughter of Nahash, sister of Zeruiah, Joab's mother. 26 So Israel and Absalom encamped in the land of Gilead. 27 Now it happened, when David had come to Mahanaim, that Shobi the son of Nahash from Rabbah of the people of Ammon, Machir the son of Ammiel from Lo Debar, and Barzillai the Gileadite from Rogelim, 28 brought beds and basins, earthen vessels and wheat, barley and flour, parched grain and beans, lentils and parched seeds, 29 honey and curds, sheep and cheese of the herd, for David and the people who were with him to eat. For they said, "The people are hungry and weary and thirsty in the wilderness."

Matthew Henry's Commentary on 2 Samuel 17:22-29

Commentary on 2 Samuel 17:22-29

(Read 2 Samuel 17:22-29)

Ahithophel hanged himself for vexation that his counsel was not followed. That will break a proud man's heart which will not break a humble man's sleep. He thought himself in danger, concluding, that, because his counsel was not followed, Absalom's cause would fail; and to prevent a possible public execution, he does justice upon himself. Thus the breath is stopped, and the head laid low, from which nothing could be expected but mischief. Absalom chased his father. But observe how God sometimes makes up to his people that comfort from strangers, which they are disappointed of in their own families. Our King needs not our help; but he assures us, that what we do for the least of his brethren, who are sick, poor, and destitute, shall be accepted and recompensed as if done to himself