In the OP's situation and others described here, I can definitely see how it would be belittling and dismissive, especially depending on the tone/other words used.
On the other hand, I feel like variations on this can be very helpful in giving people perspective, if they're tailored to that person's situation. For example, a friend might say, "I hate my job, nobody listens to me, I feel like I'm not making any difference!" and I might say, "Oh, that stinks, I'm so sorry you feel that way. But weren't you telling me last week how Jane appreciated your comments on her reports? So there's one person who seems to listen to you."
Or a friend might complain about her apartment--too small, too expensive, etc.--and, after expressing sympathy, I might say, "But it's so much closer to work, isn't it? So you don't have the long commute like you used to, and doesn't that save a lot of gas money and wear and tear on your car?"
Kind of helping them see the bright side of their particular situation. I feel like I get positive results when I do this, anyway.