Let's review. What you are trying to express is:
John lost his friend. John was crying for his friend.
Of course, such repetition is undesirable, so English has a tool you can use, called a relative-pronoun. Relative pronouns include who, whom, that, and which. Of those choices, who and whom can be used to refer to people. Who is used for subjects; whom is used for objects.
You probably know all that already, but just need advice in applying the rules.
The pronoun you want is the one in the objective case (whom), because John lost his friend. (Using the subjective case pronoun who would mean that the friend lost John, which is not what you want.)
Remember, also, that relative pronouns help you refer to a noun that would otherwise be repeated. Relative pronouns don't stand alone. The correct sentence should be:
John was crying for the friend whom he lost.
That said, even native English speakers often fail to distinguish between subjective and objective cases correctly. Therefore, you have to be careful about parroting patterns that you see and hear, as you may be copying incorrect examples. On the other hand, you are also unlikely to be stigmatized for choosing the wrong case in everyday speech.
You are correct
It should be “whom”.
✔️Yes: All of whom were picked for the Arjuna award this year.
It’s whom because of the word “of”. (It’s acting like an object, not a subject. The technical terms are “objective and subjective case.”) (See here (1) and (2))
You would say “all of him,” not “all of he”, so whom is correct.
But whom is disappearing from some contexts
In spoken English, you won’t hear whom too often, but it remains “correct”.
Whom remains important in business writing, technical writing and formal contexts.
Many English speakers do not know the difference between who and whom. In some places, it hardly matters, because using who when you should use whom is so common that it’s not even considered much of a mistake. — Lawless English
There is plenty of discussion here on ELL as well.
Best Answer
Your sentence
is understandable, but should be
meaning
If instead the sentence was phrased as
your sentence could be phrased as
However,
would probably also be understood.