Answer
Wa `alaykum as-Salamu wa Rahmatullahi wa Barakatuh.
In the Name of Allah, Most Gracious, Most Merciful.
All praise and thanks are due to Allah, and peace and blessings be upon His Messenger.
There is no authentic source that the soul of a deceased person returns to his house after death.
In his response to your question, Dr. Marawan Shahin, Professor of Hadith and its Sciences, Faculty of Usul Ad-Din (Theology), Al-Azhar University, states,
There is nothing in the sources of the Shari`ah mainly the Quran and the Sunnah, indicating that one’s soul (ruh) comes to the house 40 days after his death.
Sheikh `Abd al-Rahman Ibn Naser al-Barrak, Former Professor at Al-Imam Muhammad bin Saud Islamic Universityو adds,
When a person dies, he moves from this world to another realm, and his soul does not come back to his family and they do not feel anything of him. What is mentioned (in the question) about the soul coming back for forty days is a myth that has no foundation.
Allah Almighty knows best.