Riyad as-Salihin (The Meadows of the Righteous)
by Imam Nawawi
70. Chapter: On the excellence of having dealings with people and attending their gatherings and group prayers, their 'ids and gatherings of dhikr, visiting those who are ill, attending their funerals, helping the one in need, guiding the who is ignorant, and other things which are in their best interests in the case of someone who is able to command the good and forbid the wrong, and preventing oneself from causing injury and enduring injury
Allah Almighty says, "Help each other to goodness and taqwa." (5:2) The ayats about what I have mentioned are numerous and well-known.