Single word for when you've just met someone but you experience a kind of sad nostalgia after they leave
Solution 1:
The word might be desiderium, defined as an ardent desire or longing, especially a feeling of loss or grief for something lost.
Within the classification of emotions, I think it is either saudade or grief.
Solution 2:
newantman has already given the best possible words but I'll still write my answer.
That feeling could be described as wistfulness.
Wistfulness means full of melancholy longing or wishful yearning.
"She seemed wistful for the old days when I'd hung around her all the time".
Solution 3:
Moved
: [Cambridge] having strong feelings of sadness or sympathy, because of something someone has said or done:
"I was really moved by Rachel's visit. Knowing she would leave to travel across countey, never to be seen again, I nearly proposed on the spot."
Touched is listed as a relevant synonym.
Solution 4:
How about the Yiddish, SCHMALTZ ? (adj. schmaltzy) 'excessively sentimental'. By way of chicken/goose fat. Might taste OK but not very good for your heart. After all if you're feeling sad after seeing your old friend leave, your current friend would be justified calling you a schmaltz. In my humble opinion.