It was narrated from Abu Mas’ud that the Prophet (ﷺ) said:“The Muslim has four things due from the Muslim: He should answer [by saying Yarhamuk-Allah (may Allah have mercy on you)] to him if he sneezes (and says Al-Hamdulillah); he should accept his invitation if he invites him; he should attend his funeral if he dies; and he should visit him if he falls sick.”
Hadith No. 1434
Sunan Ibn Majah
Gradings:
Al-Albani:
Sahih
Muhammad Fouad Abd al-Baqi:
Sahih
Shuaib Al Arnaut:
Sahih Lighairihi
Zubair Ali Zai:
Isnaad Hasan