If a person has mercy on others he makes himself deserving of being shown mercy in the next world. In this world, mercy and compassion become a guarantee that in the Hereafter he will be dealt with as he behaved with people.
A hadith in Adab al-Mufrad says: مَنْ لَا يَرحَم لَا يُرحَم (Al-Adab al-Mufrad 91) (One who doesn’t have mercy will not be shown mercy.) This saying is true from the perspective of this world and the world Hereafter. With respect to the Hereafter, if a person has mercy on others he makes himself deserving of being shown mercy in the next world. In this world, mercy and compassion become a guarantee that in the Hereafter he will be dealt with as he behaved with people. This is a glad tiding, with respect to the Hereafter. This hadith is also related to this world. The Quran says: وَأَمَّا مَا يَنْفَعُ النَّاسَ فَيَمْكُثُ فِي الْأَرْضِ (One who is beneficial for others will also be able to benefit from them.) 13:17, This is why it is said, It is in giving that we receive.