I'm sorry for your loss, OP. It's a difficult situation that shouldn't have happened, but from an HR perspective, there's not a lot that will happen re a formal complaint if you make one, if I understand the chain of events correctly.
If I have, then I've dealt with similar issues a lot over the years and the upset nearly always comes back to a misunderstanding about how 'confidentiality' in a workplace actually applies.
If I have this correct, then you shared the news with your colleague. This is someone who is, to all intents and purposes, either a peer of yours or your junior. They are not your line manager, or in any management role towards you, and you made the disclosure as part of your ordinary 'chat', 'just in case'.
This is fine, and happens a lot, but it's important to understand that you chose to disclose, and that you did so to someone who has no actual, formal responsibility towards you in the workplace. You may have had 'reasons' to do so, but it remains that you offered the information directly, unprompted, to an individual who, by way of only being your co-worker, has no duty of confidentiality towards you. They aren't, and shouldn't be, expected to be holding or managing sensitive information about you in a workplace context.
From the viewpoint of your employer, if you felt the information needed to be known by someone in case of emergency, this should have been your manager, not a general colleague.
Disclosed this way - to your manager, in a closed meeting, with you stating you were telling them only so they were aware in an emergency - then, yes, there would a serious issue with the 'leak', but that doesn't seem to be the case.
Morally, your co-worker possibly shouldn't have said anything, although it sounds like they were trying to be helpful, tbh, but formally - from a company perspective - the information is classed as gossip between co-workers, and, as the information was put 'into the public domain' directly by you to the other person, then they're not held responsible for it past that. It doesn't actually matter if or how many times you said, 'don't tell anyone but....'. your employer can't police private gossip, they won't try and they aren't reasonably expected to.
I fully understand that it's upsetting, and I can completely see why, that it's being discussed, and you can ask for a message to be put out to ask people to stop , but other than that, there's not much that will be done.