I got out of the car and asked him if he was OK. He informed me that things weren't great for him and he was having some pretty bad thoughts, so I asked him if we could get some help and he agreed.
I think the biggest thing in that situation is just to ask the person if they need help, and as soon as I asked, you could see the relief on his face knowing he had someone to care for him.