[I dislike using the term "them", "themselves" when I mean a singular person in general, so I will use the term "he", which is what I was taught in high school Latin, but I really mean any singular person, male or female]
If you are getting to know someone, and if he reveals something to you that is surprising, unexpected or shocking to you, I think you'd do best to keep it to yourself at the moment, because the moment you reveal it, it can make the other person feel a number of things e.g. judged, like a bad person etc etc, which can in turn, lead to him putting up barriers, losing his trust in you, and not wanting to reveal more of himself. Reactions like those interrupt the flow of the conversation.
And really, when someone is telling you about himself, it's not about you, or your reaction to the information--it's completely about him, so give him all your attention, and the care that he needs.
Of course, context dictates how we should react e.g. if a friend runs up to you excitedly and says, "Guess what! Guess what!", it would be appropriate to express shock, excitement or whatever.
But if you're having a deep and meaningful, I try to accept what the other person is saying (which is not saying that I agree with him, or condone what he's saying), understand where he's coming from, and what led him to say what he did.