Every religion recognizes that the physical body is temporary. The physical is a gift that has been given to us to realize our work, to do what we need to do here. Otherwise it has no use.
When you die, your soul leaves your physical body, and your sense of "me" ceases to exist, and you become a budhi, like an eye that sees everything. And you see your life as it was lived. You see if you delivered what you came here to deliver. You see what things you missed and how you can perfect yourself. This feeling goes so deeply into your soul, that when you come back again (reincarnate), those things are imprinted on you. Your soul signs a contract to fulfill its mission.
If your soul accomplished everything, and your accounts are balanced, then you either get to go home, and you get to pass through the 7 ethers (4 blue and 3 upper) and your soul gets released into the infinite. Or Waheguru gives you a choice to come back. If you come back you come as an enlightened being. Like Rishi Dusht Daman. He didn't come back because he had karam to pay, he came back to bless, and to serve and and create the Khalsa.
We always celebrate when someone is born. but its also a blessing to die. you can't have one without the other. So be born with joy, and when you die, let go with joy.
You will die as you have lived. Do you want to know what happens after you die?... Tell me what happened to you today. The consciousness you lived is the same as the consciousness you will die in. If you remember Naam now, you will remember Naam when you die. If you have forgotten, you will forget when you die.