Having talked a dozen people through bad trips while tripping I can offer some advice.
Have water and a snack around. Get away from any commotion if you can. Nature is good, so is walking. If they want to talk spend most your time listening. Be super fucking calm and stretch your empathy out as much as you can. Don't argue about things, discuss instead. Silence can be a good way to grind out some time. I suppose find whatever it is that they want to do that is one step down from the bad place they are at and do it. Don't aim for five steps down go for one and than look to see where the next one is.
Here is something that always bothered me way more than it should have.
I was walking home from a 10 hour cook shift and passed a kid freaking out on some kind of acid like drug. He was in a bad way, sweating, talking to himself, writhing around. Middle of the city, he was sure to end up in the drunk tank. I thought "I should stop and help this kid." I walked by him, dead tired and callously thinking that I'd he couldn't deal with it he shouldn't have played.
I went into 7/11 to get something and while I'm in the back near the coolers the kid comes busting in, knocking down displays, throwing stuff at the nice old man who was working, just smashing the place up. Kid turns and karate kicks the plate glass door in.
Cops were on the scene in no time flat, who knows maybe they already had been called. They subdue the kid, it wad rough but not unreasonable.
I have always felt so much shame that I didn't help that kid when I knew I could. I pulled people I cared about through bad trips all the time back then and frankly it's exhausting work. It takes a lot of empathy to work people through a the two to five hours of the worst of it and I just couldn't find it in myself that night.
I've done things that I should be ashamed of and learned to live with it, sins if commission but that sin of omission has always dug at me.