Consider a person who is in pain, sad and in a difficult position/situation, and finds another man in the same situation and feels happy. What would we call such a person?
There is a word having its roots in German, "schadenfreude", which means "to derive pleasure from someone else's misfortune", but this does not fit exactly here as schadenfreude does not take the situation of the subject into consideration.
It cannot be sadism either, as that is when the person revels in inflicting pain.
There is a sense of camaraderie in this situation where the person relates to the pain of the others and somehow his own pain is alleviated.
Is there a more precise word to fit the bill?