In Civilization and its Discontents, Freud describes primary narcissism as that primal state where id, ego and external world are not differentiated. As he develops the concept of primary narcissism, libido theory and ego theory become inseparable. In his essay "On Narcissism," of 1914, Freud describes the origin of the ego in terms of the subject's ability to take itself or part of its own body as a love object. 

A new depth psychology of the ego comes into being with the new concepts of secondary narcissism, which distinguishes between narcissistic libido and object libido, and, correspondingly, between identification and object cathexis. (Loewald, p. 16) According to Loewald, this differentiation of primary narcissism takes place within the mother-infant matrix of psychic life. (In a footnote he describes this as a "shorthand expression: the matrix always 'contains' the father, by virtue of his biological-psychological functions and significance, even, and perhaps most poignantly, as the absent one." p. 22n.) 

Sublimation, in this view involves an internal re-creative return toward that matrix, a reconciliation of the polarized elements produced by individuation and, one may suspect, by sexual differentiation." 

Narcissus expired through his delusory desire "because he could not lay hold of himself, and yet perceived himself as other. (Ovid) Jacques Lacan's theory of the mirror stage follows both Ovid and Freud in stressing the basically narcissistic relation of the subject to his counterpart, the specular ego. In this way Lacan also sets up the erotic attraction or aggressive tension as a relation to a counterpart (another who is me) who can only exist because the ego is originally another. (See " Imaginary" in Laplanche and Pontalis, The Language of Psychoanalysis>)