Formal:
* Mourners (this is the most common and straightforward option)
* Assembly
* Congregation (if it's a religious service)
Informal:
* Gathering
* Group
* Attendees
You could also use a more descriptive phrase, such as:
* Those who came to pay their respects
* The friends and family of the deceased
Ultimately, the best choice depends on the context and tone of your writing.