The United Nations served one major purpose so far in history. By providing an outlet for states to lash out at each other, it assisted in preventing a direct clash between The United States and the Soviet Union. A de facto balance of power could be maintained because The United Nations permitted national grievances to be aired without taking actual actions. Additionally, it provided both superpowers (or, rather, the superpower and contender thereof) an additional arena within which to wage their Cold War, thereby not restricting the Cold War to more military arenas.
Then and now, the United Nations dealt with another issue that other states have been unable or unwilling to deal with, and that issue is refugees (although admittedly the United Nations could do a far better job).
As long as we understand the actual rôle and clout of the United Nations, and correspondingly prevent any state from effectively using the United Nations in the real world, we can and even should permit it to exist. But once we permit the United Nations to have influence over us, the United Nations becomes an organization that is exceedingly dangerous to our national interests at home and abroad.
Every state that is a member of the United Nations is so for its national interests, not out of a desire to create a worldwide utopia. And so we should not be ashamed if we also use our membership in the United Nations for our national interests.