Have you ever been in a conversation with someone, and they began discussing something painful in their life that made you uncomfortable? How did you respond? Did you quickly change the subject? Or did you take a deep breath inside—and determine that you would try stay with them by simply listening and acknowledging their hurt?
It's not easy to do that sometimes. It can happen that the painful thing in someone else's life touches into an old wound you have. Or perhaps you just have so much going on in your own life that you're tapped out and cannot hear about another's pain. Your friend really needs to be heard, and perhaps validated for feeling the way she does. But this is hard for you since you're feeling discomfort or exhaustion.
You get to decide. You have a choice to make. If you think you can set aside your feelings for the moment and listen to your friend, imagine yourself putting your "stuff" in a drawer and closing it. You can come back to it later. Then just open yourself up to his story and his needs.
If you simply cannot go there, at least acknowledge your friend's hurt and need to talk—and then just say you are sorry but you just aren't in a place to be helpful just then. You might even set a time later when you might be able to hear.
Honesty and transparency always is a good thing. The important thing is to be authentic and real about your needs while also acknowledging the needs of the other. That can be validating for you both.