we are apt to be too much elated by our own good, and too much dejected by our own bad fortune. The conversation of a friend brings us to a better, that of a stranger to a still better temper. The man within the breast, the abstract and ideal spectator of our sentiments and conduct, requires often to be awakened and put in mind of his duty, by the presence of the real spectator
 Adam Smith, The Theory of Moral Sentiments (1759). copy citation

Context

“and, on the contrary, men of the most perfect self-command, whom no difficulty can discourage, no danger appal, and who are at all times ready for the most daring and desperate enterprizes, but who, at the same time, seem to be hardened against all sense either of justice or humanity. In solitude, we are apt to feel too strongly whatever relates to ourselves: we are apt to overrate the good offices we may have done, and the injuries we may have suffered: we are apt to be too much elated by our own good, and too much dejected by our own bad fortune. The conversation of a friend brings us to a better, that of a stranger to a still better temper. The man within the breast, the abstract and ideal spectator of our sentiments and conduct, requires often to be awakened and put in mind of his duty, by the presence of the real spectator: and it is always from that spectator, from whom we can expect the least sympathy and indulgence, that we are likely to learn the most complete lesson of self-command. Are you in adversity? Do not mourn in the darkness of solitude, do not regulate your sorrow according to the indulgent sympathy of your intimate friends;” source