Abu Huraira reported: A man came to the Messenger of Allah, peace and blessings be upon him, and he complained about the hardness of his heart. The Prophet said, “If you want to soften your heart, feed the poor and pat the head of the orphan.”
Source: Musnad Aḥmad 7576
Grade: Hasan (fair) according to Ibn Hajar
عَنْ أَبِي هُرَيْرَةَ أَنَّ رَجُلًا شَكَا إِلَى رَسُولِ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ قَسْوَةَ قَلْبِهِ فَقَالَ لَهُ إِنْ أَرَدْتَ تَلْيِينَ قَلْبِكَ فَأَطْعِمْ الْمِسْكِينَ وَامْسَحْ رَأْسَ الْيَتِيمِ
7576 مسند أحمد
المحدث ابن حجر العسقلاني خلاصة حكم المحدث إسناده حسن في فتح الباري 11/155