This passage appears in the 63rd number of The Federalist. Madison is explaining the utility of a senate. A nation, he thinks, needs not only to gain the "esteem" of foreign powers but, more importantly, to actually deserve it. Without a senate, "the national councils will not possess that sensibility to the opinion of the world, which is perhaps not less necessary in order to merit, than it is to obtain, its respect and confidence."
* * *
An attention to the judgment of other nations is important to every government for two reasons: the one is, that, independently of the merits of any particular plan or measure, it is desirable, on various accounts, that it should appear to other nations as the offspring of a wise and honorable policy; the second is, that in doubtful cases, particularly where the national councils may be warped by some strong passion or momentary interest, the presumed or known opinion of the impartial world may be the best guide that can be followed. What has not America lost by her want of character with foreign nations; and how many errors and follies would she not have avoided, if the justice and propriety of her measures had, in every instance, been previously tried by the light in which they would probably appear to the unbiased part of mankind?
* * *
Federalist No. 63, constitution.org. Such was the inspiration for another blog of mine, What They Think: A Survey of the Views of Foreign Diplomats and Leaders