We must learn to suffer whatever we cannot avoid. Our life is composed, like the harmony of the world, of discords as well as of different tones, sweet and harsh, sharp and flat, soft and loud. If a musician liked only some of them, what could he sing? He has got to know how to use all of them and blend them together. So too must we with good and ill, which are of one substance with our life. Without such blending our being cannot be: one category is no less necessary than the other.

[Il faut apprendre à souffrir, ce qu’on ne peut eviter. Nostre vie est composee, comme l’harmonie du monde, de choses contraires, aussi de divers tons, doux & aspres, aigus & plats, mols & graves : Le Musicien qui n’en aymeroit que les uns, que voudroit il dire ? Il faut qu’il s’en sçache servir en commun, & les mesler. Et nous aussi, les biens & les maux, qui sont consubstantiels à nostre vie. Nostre estre ne peut sans ce meslange, & y est l’une bande non moins necessaire que l’autre. ]

Michel de Montaigne (1533-1592) French essayist
Essay (1587), “Of Experience [De l’Experience], Essays, Book 3, ch. 13 (3.13) (1595) [tr. Screech (1987)]
    (Source)

This essay and this quotation were both first present in the 2nd (1588) edition.

(Source (French)). Alternate translations:

A man must learne to endure that patiently, which he cannot avoyde conveniently. Our life is composed, as is the harmonie of the World, of contrary things; so of divers tunes, some pleasant, some harsh, some sharpe, some flat, some low and some high: What would that Musition say, that should love but some one of them? He ought to know how to use them severally and how to entermingle them. So should we both of goods and evils, which are consubstantiall to our life. Our being cannot subsist without this commixture, whereto one side is no lesse necessarie than the other.
[tr. Florio (1603)]

We must learn to suffer what we cannot evade. Our Life, like the Harmony of the World, is compos'd of contrary Things, of several Notes, sweet and harsh, sharp and flat, spritely and solemn, and the Musician who should only affect one fo these, what would he be able to do? He must know how to make use of them all, and to mix them; and we likewise the Goods and Evils which are consubstantial with Life: Our Being cannot subsist without this Mixture, and the one are no less necessary to it than the other.
[tr. Cotton (1686)]

We must learn to suffer what we cannot evade; our life, like the harmony of the world, is composed of contrary things  -- of diverse tones, sweet and harsh, sharp and flat, sprightly and solemn: the musician who should only affect some of these, what would he be able to do? he must know how to make use of them all, and to mix them; and so we should mingle the goods and evils which are consubstantial with our life; our being cannot subsist without this mixture, and the one part is no less necessary to it than the other.
[tr. Cotton/Hazlitt (1877)]

We must learn to suffer what can not be avoided. Our life, like teh harmony of the world, is composed of contrary things, also of diverse tones, sweet and harsh, keen and dull, soft and solemn. If a musician should like only some of them, what would it mean? It is necessary for him to know how to employ them all in common, and blend them; and so must we the goods and ills which are consubstantial with our life.
[tr. Ives (1925)]

We must learn to endure what we cannot avoid. Our life is composed, like the harmony of the world, of contrary things, also of different tones, sweet and harsh, sharp and flat, soft and loud. If a musician liked only one kind, what would he have to say? He must know how to use them together and blend them. And so must we do with good and evil, which are consubstantial with our life. Our existence is impossible without this mixture, and one element is no less necessary for it than the other.
[tr. Frame (1943)]

One must learn to endure what one cannot avoid. Our life, like the harmony of the world, is composed of contrarieties, also of varying tones, sweet and harsh, sharp and flat, soft and loud. If a musician liked one sort only, what effect would he make? He must be able to employ them together and blend them. And we too must accept the good and evil that are consubstantial with our life. Our existence is impossible without this mixture, and one side is no less necessary to us than the other.
[tr. Cohen (1958)]