David continues to lament Absalom's death alone in his chamber, while the army—ashamed and embarrassed, despite their big win—returns to the city.
Joab comes into David and tells him to man up. Absalom hated him and was a rebel, and it's demoralizing to see David broken up over the death of an enemy, while his soldiers, who've just won a victory, feel like he hates them.
Joab says David needs to go out and speak kindly to his soldiers, or else they'll all abandon him.
So, David puts himself together, heeds Joab's advice, and sits before his soldiers at the city gates.
Malice Toward None, Charity for All
In the aftermath of the battle, Israel is confused about what's going to happen. The majority of people sided with Absalom, so they don't know how David is going to react to being their king again, or what they should do about making him the king again.
David sends out messages telling people not to worry about how they sided against him and not to hesitate in letting him rule them again.
He even goes so far as replacing Joab with Amasa—Absalom's commander—as the new head of David's army. In return, Amasa helps win the people's hearts back to David.
David comes back over the Jordan into Judah, and Shimei and Ziba respectively come to meet him.
Shimei apologizes for the curses he flung at David earlier. Abishai suggests that it would be a good idea to kill Shimei, but David angrily rejects this solution. He forgives Shimei and swears that he won't kill him.
King David, AKA Judge Judy
Next, Mephibosheth—who hasn't cut his beard or washed his clothes since David left—comes up to David.
David asks Mephibosheth why he didn't come with him, and Mephibosheth says that Ziba deceived him. He abandoned Mephibosheth in Jerusalem, and rode away before him.
David says that Mephibosheth and Ziba will both split the land, now, but Mephibosheth says that Ziba can have it all, since David returned safely.
David also agrees to provide for an eighty year old man named Barzillai who helps him over the Jordan, and also accepts the servant Barzillai offers to him.
When David arrives in Judah, the people of Israel say that the people of Judah shouldn't be allowed to monopolize the king and make him their own. But the people of Judah argue more fiercely in favor of their privileged position with the king, and win.