Assalamualaikum ustaz. Is there a restriction against eating in a house where one of its occupants just died?
Waalaikumussalam wrt. wbt.,
Alhamdulillah, praise and gratitude to Allah SWT for His countless blessings for us all. Praise and salutations to our beloved Prophet Muhammad PBUH, his family, companions, and all those who follow his footsteps until the Final day.
We are commanded to hasten in the management of a deceased which includes its bathing, shrouding, praying and funeral. This is as stated in a hadith narrated by Abu Hurairah RA, where Rasullullah PBUH said:
أَسْرِعُوا بِالْجَنَازَةِ فَإِنْ تَكُ صَالِحَةً فَخَيْرٌ تُقَدِّمُونَهَا عَلَيْهِ وَإِنْ تَكُنْ غَيْرَ ذَلِكَ فَشَرٌّ تَضَعُونَهُ عَنْ رِقَابِكُمْ
“Hasten with the Janazah, for if it was righteous then your are taking it toward something good, and if it was otherwise, then it is an evil of which you are relieving yourselves.” 
According to this hadith, is it sunnah to hasten the funeral prayer and bring it to the graveyard for its burial. 
Hastening with the deceased in the above hadith includes the process of bathing, shrouding, and funeral procession towards his grave for his funeral. 
Thus, the basics of managing a deceased are four. First, bathing. Second, shrouding. Third, funeral prayer. Fourth, funeral. These are the basics of the fardu kifayah according to the ijma’ of the scholars without khilaf. 
It should be reminded that all religious restrictions or prohibitions should be based on evidences that support the statement. In the above=presented issue, we don’t find any evidence from al-Quran or hadith regarding any prohibition against eating in a house where one of its occupants has died.
Hence, here we state there is no issue for the family member of the deceased or anyone for that matter to eat in the house of the deceased but one must first obtain permission from the owner.
Sunnah matters for residents living near are for them to help the deceased’s family members in managing the body of the deceased as well as easing their burden. The deceased’s family members and neighbours can also help in preparing food for the people who live with the deceased during the day and night. This follows a hadith where the Prophet PBUH instructed people to cook for the family of Ja’far R.Anha:
اصْنَعُوا لآلِ جَعْفَرٍ طَعَامًا فَإِنَّهُ قَدْ أَتَاهُمْ أَمْرٌ شَغَلَهُمْ
“Prepare food for the family of Ja’far for there came upon them an incident which has engaged them.” 
Imam al-Syafi’I explained in his book al-Umm: “I prefer if the deceased’s neighbour or those who have a familial tie with the deceased to prepare food for the deceased’s family on the night and night of the death, filling (food) for it is sunnah and honoured remembrance and it is a good deed before and after us. The reason is when the news of Ja’far’s death came, Rasullullah PBUH said: “Prepare food for Ja’far’s family for a sad matter has come to them.” 
Likewise, offering condolences as well as supplicating for the deceased for forgiveness and blessings from Allah SWT. Among the condolences that one can offer taught by the Prophet PBUH is stated in a narration from Usamah bin Zaid RA, the Prophet PBUH said the following:
أَنَّ لِلَّهِ مَا أَخَذَ، وَلَهُ مَا أَعْطَى، وَكُلُّ شَىْءٍ عِنْدَهُ بِأَجَلٍ مُسَمًّى، فَمُرْهَا فَلْتَصْبِرْ وَلْتَحْتَسِبْ
“Go back and tell her that whatever Allah takes is His, and whatever He gives is His, and everything with Him has a limited fixed term (in this world). So, order her to be patient and hope for Allah’s reward.” 
Generally, there are numerous kaifiat or methodologies of offering condolences. A person can just offer his condolences in person. The same if he sends a representative to convey his condolences on his behalf as what has happened in the above hadith from Usamah, when Rasullullah PBUH send a representative to offer his condolences for the calamity.
To end, we conclude:
- There is no restriction to eat in a house where one of its occupants just died, however, one must first obtain permission from the owner or occupants of the house.
- Offering condolences to the deceased’s family who has just lost their loved one.
- Hasten the management of the decease until he is buried.
May Allah SWT bless us with great understanding in this religion. We end this discussion with the supplication:
اللَهُمَّ اخْتِمْ لنا بِحُسْنِ الْخَاتِمَة وَلاَ تَخْتِمْ عَلَيْنَا بِسُوءِ الخَاتِمَة
“O Allah, end our lives with a good ending and don’t You end our lives with a bad ending.”