"Not only does nichum aveilim allow one to perform an act of kindness by visiting the mourners and offering them words of comfort and encouragement, but we are taught that the soul of the deceased is comforted when one performs nichum aveilim, as well." (source)
"The whole community came to the house to do nichum avel." (Glinert)