W. Somerset Maugham said this quote

Philip thought that in throwing over the desire for happiness he was casting aside the last of his illusions. His life had seemed horrible when it was measured by its happiness, but now he seemed to gather strength as he realised that it might be measured by something else. Happiness mattered as little as pain. They came in, both of them, as all the other details of his life came in, to the elaboration of the design. He seemed for an instant to stand above the accidents of his existence, and he felt that they could not affect him again as they had done before. Whatever happened to him now would be one more motive to add to the complexity of the pattern, and when the end approached he would rejoice in its completion. It would be a work of art, and it would be none the less beautiful because he alone knew of its existence, and with his death it would at once cease to be.