They both say that God is everything and everything is God. This is not unlike Brahman in Hinduism, which btw is both pantheistic and panentheistic without being mutually exclusive. Brahman is technically not God, but for the sake of discussion we'll dispense with that. Sarvam khalvidam brahma ... "all this is Brahman". After death we shed our physical bodies. If we believe we are nondifferent from God, then we exist after death. Now, this is all just my belief based on Hindu scriptures, specifically the Bhagavad Gita. Krishna first lays all this out in chapter 2. He reassures Arjuna that we will always exist: Never was there a time when I did not exist, nor you, nor all these kings; nor in the future shall any of us cease to be. Then later on in the discourse expands on it. So I believe there must be an afterlife in both.