@Anonynoname I am so sorry to hear about your loss, and am sending you a massive hug and virtual support.
My DH also died very suddenly - 4 weeks ago today - in hospital from a stroke caused by his stage 4 cancer. The cancer was picked up by chance, and it was formally confirmed at the start of March.
Like you, I thought he was going to come home - and then he suddenly deteriorated. I was (and still am) distraught.
You will probably go over and over various scenarios - please please be kind to yourself.
You did the very best that you could at the time. I suspect we all wish that we had done things differently with the benefit of hindsight - I certainly do - but it won't change the final dreadful outcome.
Take time and accept as much help as you can.
The grief is unbearable at times - be kind to yourself, and I will be thinking of you xx