Oh, interesting question, crossed my mind occasionally, but now that I think about it, I guess there's only one way to handle such unfortunate events.
1) Have all of my collection handed over to my best friend so he can sell everything. It's important that it is him who sells it as opposed to, say, some kind of official, since the presence of my Doujinshi could jeopardize the last step and also result in me being dishonorably discharged post-mortem (depending on where I work) or wind up in the newspapers as the "Dead Monster of Germany".
If my collection has reached the size I predict by my (hopefully late) demise, everything will go as planned.
Furthermore, I entrust my best friend with this task because he's just as terrible as me when it comes to money, always looking for maximum profit while maintaining one last shred of humanity - never stealing. Also, there's no chance of him keeping or using some of my Doujinshi because of his sexual orientation, so he's my safest bet.
2) Once he has managed to sell everything and thus gathered enough funds, I want him to either
2a) have a hospital wing erected in my name (definitely no charities)
2b) have my grave changed into a real tomb
In both cases, I'd want a statue of me sculptured, either at the entrance of the tomb or in the waiting room of the ward.
I think I'd actually prefer option 2b), there's a high risk of my tomb being desecrated by juvenile delinquents or, even worse, being used for below-average porn movies by goths.
Of course, I can only judge this based on my current situation, I'm sure that things would change should I get married or become otherwise preoccupied, but right now, next to sports and other things I do to challenge myself (Touhou being one of them), my collection is one of the most important aspects of my life, it's that much fun to me. I could take everything to the grave with me, but that would greatly increase the size of my grave and thus the costs. Furthermore, after death, I want to pass on (whatever that would mean), and I think I have enough respect for all individual items in my collection that I'd want other collections to become bigger thanks to them - they shouldn't rot beneath the earth, that part is for me to play.
Also, I always wanted to leave a mark somewhere, not just going poof and disappearing. Donating the money to a hospital would be a great way to do that, I think.