In my experience, it's like a storm. You just have to let it pass. Hunker down and distract yourself a bit. I meditate, some times; but, any engaging, constructive activity can help. Some times it helps to vent and unload on some one you can confide in, but, that's not always possible, or helpful.
It rarely ever is useful to think about the problem while you are in the storm though. A calmer, saner, more serene and calm mind is usually always better at appraising the situation. An angry, frustrated, exasperated mind can't think as clear.
Acknowledge the way you feel, accept it, and bide your time, knowing it will pass. If you can't accept it, fully, accept that too.
Journaling/writing to yourself can help too. It's a private way to communicate with yourself that is a bit more physical and concrete, than just the conversations with yourself in your head. And you can throw the written thoughts away, when you are done if you want, or keep the stuff you may want to remember. That's just one of many, constructive ways to bide one's time, while waiting for the waves to calm down.
I struggle with all of the above; but somehow I imagine, having a better and more fruitful relationship with ourself, might be a path to dealing with any lack of, or lack in, quality of relationships with others. I don't think we should reject the outside world outright, and that that's the only answer; but, perhaps knowing ourselves a bit better, can help us to know others, and our relation to them, a bit better...