Freud, "Mourning and Melancholia"
It was our expectation that the economic condition for the emergence of mania after the melancholia has run its course is to be found in the ambivalence which dominates the latter affection; and in this we found support from analogies in various other fields. But there is one fact before which that expectation must bow.
Of the three preconditions of melancholia—loss of the object, ambivalence, and regression of libido into the ego— the first two are also found in the obsessional self-reproaches arising after a death has occurred. In those cases it is unquestionably the ambivalence which is the motive force of the conflict, and observation shows that after the conflict has come to an end there is nothing left over in the nature of the triumph of a manic state of mind. We are thus led to the third factor as the only one responsible for the result. The accumulation of cathexis which is at first bound and then, after the work of melancholia is finished, becomes free and makes mania possible must be linked with regression of the libido to narcissism. The conflict within the ego, which melancholia substitutes for the struggle over the object, must act like a painful wound which calls for an extraordinarily high anti-cathexis.—But here once again, it will be well to call a halt and to postpone any further explanation of mania until we have gained some insight into the economic nature, first, of physical pain, and then of the mental pain which is analogous to it.