Some specific ideas, based on my own personal experiences (the death of my sister) and stories I heard (from my mother who is a pastor):
The after funeral time (coffee, cake, you know) is often overwhelming for the main grievers. Especially when younger people died, a lot of people show up, all of them want to offer condolences and talk. So here a few pointers for that specific time:
1: After the funeral/service there is often a chance to offer condolences to the bereaved. if you want to say something that takes longer then about 2 sentences, wait for another time. This is for multiple reasons: First of all, more people are bound to want to express their condolences. Two: The family is often still in a haze and a lot of people is just overwhelming. Chances are they won't process your story.
2: If you want to do something nice for them, offer to get them something to eat or drink. With people lining up to offer condolences, the bereaved sometimes just don't get a chance to look after themselves. I knew when I was in that position, I was intercepted every time I wanted to walk towards the coffee table. I'm forver grateful to my friend who offered to fetch something for me.
3: A lot of people don't really know what to say, and start making promises that they'll call them, offer a lunch date, etcetera. If you make such promises, act upon them. You have no idea how many people say that they will call, and are never heard from again.
General etiquette around dead people:
1: Don't ask how someone died. if the family wants to share, they will do it without being asked to.
2: When someone has committed suicide, don't try lines like 'It was his/her own choice', 'He/she is in a better place now', etc. You get the gist. Not only doesn't it lift any of the grief, but a lot of people realize that suicide isn't always a person's own conscious choice. Sometimes people die during a attack of psychosis, or something similar. Sometimes people are not themselves when they commit suicide. Hinting at that it might be better like this, or the person wanted it, is making it very much worse, because it might not be true.
3: If you want to do something that will be appreciated, write and call after the funeral has passed, and in the weeks, months and years after. It is nice that when life seems to take its course again, to receive a little reminder that people have not forgoten about the dead person, and haven't forgotten the (often invisible) grief of those close to that person.
4: When offering help, make sure you do it in a time that the person is not occupied with other things - make sure they have some time to process it. Try to offer tangible help. Not like 'when you need me, call me'. While this is nice, it is rarely acted upon. A few things that might work to offer: Offer to do groceries, cook, bring food, or help with other household tasks. Offer to come over to just listen, or look at pictures, read stories.
5: Don't avoid the topic of the deceased. People often want to share stories and talk about their grief. Don't beandip.
6: When a bereaved cries, offer a shoulder, some tissues....but don't try to soothe it or make the crying stop. Don't try to make the bereaved 'feel better'. Just let them cry for as long as they need to.