All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
The scholars are of the view that if the family of the dead prepare food so that the people would gather, then this is an impressible matter and it is an innovation because Jareer (ibn ‘Abdullaah al-Bajali) was reported through a correct chain of narration to have said: “We used to consider the gathering of the people at the house of the dead person and preparing food after the burial, as being a lamentation (which is forbidden).”
This narration is clear evidence that this act is forbidden as stated by Mulla Ali al-Qaari .
As regards eating this food, then the least that can be said about this is that it is disliked, so a Muslim should avoid it.
However, if some relatives of the dead or their neighbors prepare food for them (the family of the dead) without gathering, then it is permissible for the family of the dead to eat from this food as the Prophet said: “Prepare food for the family of Ja’far as something has occurred to them that is occupying them.” [At-Tirmithi and Al-Albaani classified it as Hassan]
Allaah Knows best.