This was what Arjun asked Lord Shri Krishna.
Lord Krishna said that the learned do not lament for either the living or the dead.
He further told that our body is destined to vanquish either today or tomorrow. It is the atma (soul) which lives on forever.
Therefore for the wise, there is no cause for lamentation regardless of the condition of the material body.
He further stated that there was never a time when I or you or anyone did not exist nor there will be anytime when I or you or anyone will cease to exist.
We have always been present in the past and we will always continue to be in the future.
He further explained that the materialistic body changes from childhood to young and finally to old age but the atma (soul) always remains the same and since it is sure to have another body in the next birth therefore there is no reason to lament.