Nationalism really comes down to a debate between Kant and Hegel. I am on the side of Kant in this, but I think Hegel also had some good points.  I am not sure how to reconcile them. You can see the side of nationalism in Howard Bloom's, The Lucifer Principle. But the draw backs of the system in the USA was brought to print by Allen Bloom's masterpiece, The Closing of the American Mind.
But how to deal with this I do not know. It seems to me that Trump might be able to get things back on track.