Believe it or not, I've had that same idea floating around my head for about eight years now.
I did some (unofficial) research on the experience and sensation of altered time passage under certain drugs, notably by DMT users. Some people reported that their ten minute trips felt like decades. They felt like they had lived and experienced entire lifetimes.
Then there's the hypothesis (still untested, because of measurement methodology limitations) that copious amounts of DMT is released upon death. If true, it would mean that as you die, you enter into an experientially "infinite" conscious state. If true, it could also be the brain's dying pangs to cling onto consciousness, not unlike the body's dying pangs to cling onto life.
On a loosely related note, I've come to the conclusion that consciousness must be some sort fundamental universal force that is measurable only in sufficiently complex biological constructs through which this force emerges and manifests. Different (non-human) life forms arguably have some degree of consciousness, and we could qualitatively assign these degrees as weaker and stronger, relative to the human baseline. A dog, for example, is more conscious than a mouse. How this can be quantified and measured aside from neuronal activity is uncertain. Like dark matter, we can only hypothesize its presence and observe its effects.
If true, this force is present outside of life forms, which means it's around before and after your death. The challenge now would be explaining the mechanics of how this force interacts with and affects the biological entity, and why that would be sufficient reason to think that it entails continuity of consciousness beyond biological expiration.
The search continues. David Chalmers: 1. Me: 0.