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 7522, Grade: Hasan