Rashi notes the juxtaposition of Sarah Imeinu’s conception and giving birth to Yitzchak Avinu upon Avraham Avinu’s prayer on behalf of Avimelech. He explains that the Torah put this passage (Sarah’s conception and giving birth) next to the incident of Avimelech to teach that whoever seeks mercy by praying for his friend, while he himself (the individual praying) needs that same thing (for which he is praying on behalf of his friend), he (the one praying), is answered first. Avimelech was in need – Avraham prayed for him; thus, he was answered by Hashem – before Avimelech.
Imagine two people who are waiting to be blessed with a child, or two people have similar diseases and are both gravely ill. Surely, both are praying to Hashem for themselves. What if one of them prays for the other one to be healed, to have a child – despite the fact that he himself is in dire need of a blessing? Hashem will listen to him – first!
The Sefas Emes derives an even stronger lesson from here. He explains that if a person prays for his friend despite his own need, Hashem will not listen to his friend’s entreaty; he will be answered first. He explains it in the following manner. For Avraham, it would have been highly advantageous that Avimelech not be cured. As we find later on, the slander that was being popularized by the letzanei hador, the scoffers of the time, was that Avraham had not actually fathered Yitzchak. It was during her captivity in Avimelech’s home that the king took advantage of her, and, thus, Yitzchak Avinu was really Avimelech’s son – not Avraham’s. So it would have been best for Avraham to see to it that Avimelech remain sick and unable to father a child. This was not our Patriarch. He did the correct and proper thing, regardless of the ramifications. The chips will fall where they may, but Avraham was not playing G-d. He overcame his personal need.
Likewise, we find Avraham Avinu “coming forward,” Vayigash Avraham, to (as Rashi explains) argue forcefully, to ask for mercy and pray to Hashem on behalf of the Sodomites. Why should Avraham contend with Hashem concerning Sodom? What does Rashi mean when he says that vayigash Avraham, “Avraham came forward,” denotes preparation for war? Whom was he fighting? Horav Zev Weinberger, Shlita, explains that Avraham was battling his own human nature, which saw good in everyone and sought every opportunity to engender chesed. Sodom was the complete antithesis of Avraham. For him to overcome his feelings toward them, his natural animus toward cruelty, was a great challenge. He did it because he was Avraham.
Furthermore, when Sarah weaned Yitzchak (b’yom higamal es Yitzchak) (the word higamal has varied connotations – one of them being that it was the day of Yitzchak’s Bris Milah), Avraham invited the great leaders of the civilized world. Among them were Shem, Eivar and Avimelech. Why did he invite Avimelech? True, he was a powerful and distinguished leader, but his presence at Yitzchak’s Bris only added fuel to the slanderous accusations that he was Yitzchak’s real father.
Avraham took all of this into consideration, and he still prayed for Avimelech. The slanderer would continue slandering, regardless of Avraham’s reactions. Such people live in the sewers of society and thrive in the dirt they spew. He was not going to refrain from praying for Avimelech, who was also in need. This is why the Patriarch earned the appellation amud hachesed, pillar of kindness. He performed kindness, not only when it was convenient or he could benefit in prestige or money. He acted with chesed, because it was the correct thing to do. He overcame his personal feelings and prayed for Avimelech, despite the possible negative consequence.