Google announced yesterday that they added a new feature for Google Accounts, where the user can define what happens to their account after they die. How does Google know you die? Well, if you are inactive (i.e. don't login to your account) for X months then Google will assume you've died.
Believe it or not, this is a common issue. I've covered it three times here, either family looking to gain access to the deceased Gmail account or deceased AdSense account and even to look up their search history to see why they may have taken their own life. It is an extremely common thing I see in the forums and I guess Google decided to address it with what they call Inactive Account Manager.
In short, you can login to your Gmail account. Note, if you use a Google Apps account, it does not work because technically the company owns your account. You will be promoted to set an alert notification method (a cell phone number) and then a time out period, where Google will alert you 2 months prior to the expiration period you set, which can be 3, 6, 9 or 12 months of inactivity. Then you can add "trusted contacts" who can be notified that your account is inactive and even share your data with them. In addition, you can set your account to be deleted completely after this period.
Finally, you can set an auto-response to all emails you receive. Here is an example:
For more details on these features, see this help document.
Forum discussion at Google+.