Søren Kierkegaard said this quote

In love with myself, that is what people say I am. It doesn’t surprise me, for how could they notice that I can love when I love only you; how could anyone else suspect it when I love only you? In love with myself. Why? Because I’m in love with you, because it is you I love, you alone, and all that truly belongs to you, and it is thus I love myself, because this, my self, belongs to you, so that if I ceased loving you I would cease loving myself. What then is, in the eyes of the profane world, an expression of the greatest egoism, is for your initiated eyes the expression of purest sympathy; what in the profane eyes of the world is an expression of the most prosaic self-preservation, is for your sacred sight the expression of the most enthusiastic self-annihilation.”―Johannes de Silentio, from_Either/Or: A Fragment of Life_