Currently I just deny them attention until they move on. Short, disinterested answers. Invisible on chat programs. "Busy". "I'll look into it." Politely acknowledge an emotional topic, then redirect the conversation.
Talking it out doesn't work in my experience. If I thought things could change by telling someone that they're asking something unreasonable, then I would. I can't save anyone from their sadness or listen to them complain for hours a day.
I prefer friendships where we handle our own problems and stop to help each other when we can. I put a lot into trying to help the people close to me or cheer them up, just not the ones who grab on and start making demands without once thinking of me.