When the heart is turned upside down

In times of sadness, loss, grief, how can we be there for each other without violating the boundaries of each other?  Recently a dear friend lost a close friend of his who had died unexpectedly. I felt so sad for his loss, and I expressed this to him. I knew, that  there was no consolation for him in this moment, but I thought if I were in his situation, I would want my friends to just be there with me, without “doing” anything, only to know they would  stand by my side. I also felt insecure, what would he need as a support from me, if anything at all. What would be inappropriate or too much?
To be there for one another in times of suffering, loss, death  is not easy, because everyone has their own ways to cope with an extreme life situation, and needs are different.
My experience in this is, to keep my heart open, not expecting anything and just being there. If the other wants to reach out, I am available. If not, I will just be there with my heart open, non intrusive, but staying firm as a friend.

The image is a painting by one of my clients, which she gifted to me.