Question: what to say when your friend is in pain?
Answer: Acknowledge their pain. Perhaps the best thing you can do is to acknowledge how the other person feels. When you connect with someone's pain or struggle, it helps him feel supported. It shows you understand (or are trying to understand) how he might be feeling.