OP, first sorry to hear about your situation, and your wife's health issues. Not easy to deal with these things even without the visa thing.
As far as I'm aware, legally your marriage-based visa is void if the Mrs. passes away. I don't know if there's a set time you are supposed to report this to immigration, but with the 90 days reports/annual renewal it's just a matter of time until it could be dodged. How things are addressed by immigration has to do with the local office attitude - some are more helpful/lenient, some less so. But in general, I don't think they go out of their way to cause trouble in such cases.
I would take this up with your immigration office, and make things clear - easier than to deal with it solo, and with the added burden of funeral, grief and so on. Similarly, maybe time to make clear arrangements (if you haven't already) regarding will, inheritance and future help around the house.