You can't bequeath your Steam account to your loved ones when the sad day of your passing comes around, at least not without breaking the TOS, but it turns out you can leave your GOG games to someone—as long as everyone involved is willing to do some legwork up front.
Nobody likes to think about this sort of thing too much, and when we do I imagine we're generally more focused on what needs to be deleted rather than what should be left for others. (Or maybe that's just me?) But most of us have accumulated sizable digital game libraries over the years, and it's a genuinely awful waste to let them be lost, especially when we know others who would appreciate such a gift.
Giving someone your username and password is easy enough, but legally bequeathing a digital library turns out to be a lot trickier. Valve is a hard "no" on the matter—which I suppose is actually quite simple, if not the desired response—but GOG says it will try to accommodate such requests, as long as those left behind can prove that everything is on the up-and-up.
"As you may know, GOG does not collect information sufficient to truly identify a particular person (such as name and surname) or their family or marital status," GOG said in a statement provided to PC Gamer. "For this reason, we are not able to establish that someone is related to a particular user or that a particular user has passed away.
"In general, your GOG account and GOG content is not transferable. However, if you can obtain a copy of a court order that specifically entitles someone to your GOG personal account, the digital content attached to it taking into account the EULAs of specific games within it, and that specifically refers to your GOG username or at least email address used to create such an account, we'd do our best to make it happen. We're willing to handle such a situation and preserve your GOG library—but currently we can only do it with the help of the justice system."
GOG noted in its statement that one of the big challenges facing it and other digital platforms is that this sort of thing is all very new, and that there's "little to no existing legal guidance on the issue of videogames preservation." And that's true: I have shelves of old games in boxes that I can easily will to someone (who, allowing myself a moment of honesty and clarity, will certainly just fire it all in the trash) but digital game libraries literally weren't a thing 20 years ago, so the question of "what happens to this stuff" has just never come up on a meaningful scale.
As with all things, the law lags behind real life and corporate entities will be dragged kicking and screaming behind the law, and everything is further complicated by the fact that game publishers, for now at least, can pretty much pull the plug on games whenever they want: It's arguable that the more pressing question right now isn't what happens to your games when you die, but what happens to you when your games die? Getting it all sorted will almost certainly take years, if not decades, but until then it's nice to know that GOG is at least willing to consider doing your dead self a solid.
Of course, GOG has one thing going for it that Steam does not: As the rep pointed out, GOG games all come with offline installers, so you can just download all your games, dump them onto a flash drive, and leave it behind for whoever you like. Sometimes, simplicity really is best.