3 Answers
3

...a person who has lost a loved one often feels that he has been abandoned by God; that there is no God where he is. We say to the mourner, therefore, that HaMakom should comfort him: We pray that he be blessed by a renewed awareness of God's presence, even in the grief-stricken place in which he now finds himself...

The loss is felt as a void in one's life - an empty space . Only G-D who is called HAMAKOM in that HE IS THE SPACE OF THE WORLD BUT THE WORLD IS NOT HIS SPACE. This means the existence is within G-D so G-D is the space.

Since nothing in the world can make up for the void except for G-D who is and fills all space we express the wish that G-D will fill that void and make the heart whole.

btw MAKOM is the square of the SHEM HAVA-Y-AH according to the ARIZAL.