I have something like this in place:
Use a password management tool (e.g. 1Password) which has your different accounts/credentials.
Prepare a document (e.g. will) that will disclose the password management tool's master password to your next of kin or designated executor.
In addition, I prepared a list of 'emergency documents' that contains all the pertinent info I have (passports, social security numbers, tax documents, etc) in both electronic and paper forms.
It's a convenience for me that I have access to all of this at my finger tips, but I imagine it would be a great convenience / time-saver for what is already a trying and difficult time.