Krishna says in the Bhagavad Gita to Arjuna that one should not lament.
aśocyān anvaśocas tvaḿ
prajñā-vādāḿś ca bhāṣase
gatāsūn agatāsūḿś ca
The Supreme Personality of Godhead said: While speaking learned words, you are mourning for what is not worthy of grief. Those who are wise lament neither for the living nor for the dead. - BG 2.11
But yet when we study the lives of close associates of Krishna, they cried during loss. For example Draupadi was lamenting when her young children were slain by Ashwathama. Similarly Arjuna lamented when Abhimanyu died in the battle. Despite hearing the Bhagavad Gita, Arjuna showed grief towards the death of his son. However this type of lamentation is different from the lamentation of mundane people.
If we look at the words spoken above by Krishna to Arjuna, Krishna says that Arjuna is apparently speaking like a learned man when he is not. Up until that point, Arjuna was lamenting that he will not fight his relatives, friends, families and teachers. He was lamenting that such a war with family is only a cause of future suffering. There will be no good from such a battle. Better I retire than fight was Arjuna's proposal. To that, Krishna mildly rebukes Arjuna saying a true learned and wise man does not lament neither for the living nor for the dead. Then Krishna goes on to sing the most famous song sung in the history of creation Bhagavad Gita.
We should understand that Krishna's reply about mourning was in relation to the body. Arjuna was arguing against war not from the standpoint of "spiritual dharma" but from a material idea of bodily relations. After all our family, friends and relatives are true as long as we hold this body, but once we leave this body or die, our relationship that stems from this body also dies. So Krishna chastises Arjuna that you are speaking like a learned man when you are simply grieving for a dead body which eventually will fade away with time. Therefore Krishna says one should not lament for the deteriorating and dead body. The body given to us is simply a combination of blood, bone, tissue, urine, bile, and stool. So when the body ceases to function, are we really lamenting for the loss of blood, bone, tissue and stool?
If we deeply think about it, the answer is no. We are actually lamenting for the person who was within the body. Unfortunately modern science teaches us that we fundamentally are made of cells, DNA and RNA, then if that is the case why lament? We can find DNA and RNA still in a dead body? So surely there is something more that keeps the body "alive" and at death that something stops to be "alive". That something Krishna calls soul or jivatma. We should lament for the soul and not the body.
Great devotees such as Draupadi and Arjuna lamented not for the body but for the soul that departed that they no more will be able to seek the departed soul's association. When we speak of association we speak of godly association. When we associate with a devotee, we come closer to God Krishna and when that same devotee departs, we lament that we no more will be able to associate with that soul.
In fact great devotees such as Srila Prabhupada and Narada Muni lament more for the souls while living more so than death. Why? Because only when living is there an opportunity for the soul to come out of ignorance and dedicate one's consciousness to God Krishna. After death there is no such opportunity. So great devotees such as Sage Narada lament when people are alive more so than death because they see the materialistic people are wasting their precious opportunity as human beings to become enlightened, instead they wallow in the ignorance of material gratification in the name of nationality, family, career, philanthropy etc
In conclusion, we should also follow in the footsteps of great souls (mahajana yena gatha sapantha). We should also lament for the living but not for the body but to benefit the soul's journey back to the spiritual Kingdom. If we truly love someone, then we should give them the topmost benefit - A benefit that never fades away with time. That benefit is to pave the way for souls to go back to the Kingdom of God where there is no death and no suffering. This is the greatest welfare and goodwill one can give for the living.