Foundation myth for a story idea:

First, there was Nothing, and Nothing, being nothing, rejected itself with such force that there arose two Principles. These Principles were perfectly balanced in opposition and infinite power, as They were the sum of Everything. And They yearned for the Nothingness from which They had arisen, and the perfect unity of that Nothingness. However, being Everything, Nothingness rejected Them and They were bound to "being." Held in perfect opposition, They created physical things from Their being to fill the not-nothingness around Them and to mimic Their search for unity and dissolution. In this, stars were born and died. But still, it was not enough, and They yearned towards each other even as They were held infinitely apart.

The creation of corporeal entities given action by Their power but no life was soon not enough, and They tried a new thing. This time, They each created a corporeal form and placed within it a great portion of Their own awareness. And then, such was the nature of Their physical forms that He and She could meet, and conjoin, and experience for an ecstatic moment unity within Their disunity. So like the nothingness for which They both yearned was this moment that His desire to return to nothingness became all-consuming, and He tried a new game which His physical form permitted. He attempted death. Yet, as for both of Them, His corporeal form holds but a portion of His infinite existence and death is not possible, only sleep.

Aware that the permanence of death is denied Them, She chose instead to enact the cycle of living and death. Even as they briefly united, She joined the dust of His corporeal form with the substance of Hers and created living creatures. His body is their shelter. She nourishes them, and tends them, and lays them down when they die; as She and He can not.

But sleep cannot hold Him as it is but the illusion of death and nothingness. Dreams intrude and He awakes, and aware of each other again They yearn once more together, join in ecstatic unity, and then part, and so They shall continue until they tire of the cycle and move on.

*** A few details of doctrine: He is the Earth and solid things. She is Air, Water, Fire, fluidity and movement. They are symbolized by Moon (he) and Sun (she), with the image of the sun and moon in the sky striving to catch one another yet unable to more than approach distantly. In fact, since They are too infinite to fit in anything, the sun and moon are bits of them, also striving to enact their ultimate unity and dissolution. All living things are a unity of the two of them, thus we have things like personality. The fact of death is explained by this, in that they cannot, even in proxies such as living creatures, remain together permanently, so the proxies eventually break down and die. However, birth is also a reflection of immortality.

In the root religion for which this is the basic creation myth, there is no individual afterlife. Since the two principles are essentially energy, upon death the energy of life returns to the system and is eventually reapportioned. This is NOT reincarnation.

In this world, there will also be 2 primary kinds of pantheism, and some philosophers who aren't into deities, and lots of sects and heresies. Reincarnation will probably pop up in one of them. There is no magic, although there will be people who believe in magic and its practice.