I have previously examined Žižek’s negative attitude towards God and Nature and associated this attitude with melancholy. Here, I study the topic further to elucidate what Žižek’s thesis “Melancholy is the beginning of philosophy” means.
In Absolute Recoil, Žižek rejects the standard notion of the melancholic as “the subject fixated on the lost object, unable to perform the work of mourning in relation to it” and redefines the melancholic as “the subject who possesses the object but has lost his desire for it, because the cause which made him desire it has withdrawn, lost its efficacy.”
However, in the next page, Žižek implies that melancholy is like a desire where “objet a is lost”. But isn’t desire invoked by a lost object? So what is melancholy? Is it desire or its loss? To answer this, let’s go back to Žižek’s reference with which he justifies his redefinition of melancholy: Agamben’s Stanzas. For Agamben, melancholy is a loss that’s staged, simulated in order to appropriate an object that is in fact impossible to lose or gain:
[In melancholy,] if the libido behaves as if a loss had occurred although nothing has in fact been lost; this is because the libido stages a simulation where what cannot be lost because it has never been possessed appears as lost, and what could never be possessed because it had never perhaps existed may be appropriated insofar as it is lost. (Stanzas)
Why would the melancholic simulate a loss if (s)he had lost his/her desire? (S)he wouldn’t stage a loss of the object if (s)he had really lost his/her desire for the object. Thus Žižek’s redefinition does not hold: melancholy is not a “loss of desire” but the subject’s attachment to an impossible object, therefore melancholy is pure desire itself. The loss that’s staged in melancholy is very close to Lacan’s definition of desire as “a relation of being to lack” (Seminar 2). Melancholy can be said to be a “loss of desire” only in a relative sense of losing desire in earthly (possible) objects. But those other objects are not the true object of the melancholic desire, so it’s incorrect to say that “the melancholic possesses the object but doesn’t desire it”. On the contrary, we must assert that every desire is a melancholic desire.
How is melancholy related to philosophy? Rebecca Comay asks the question “Is Hegel a mourner or a melancholic?” (Hegel’s Last Words) and argues that Hegel fails to mourn and sublate. In Absolute Recoil, Žižek challenges the notion of a melancholic Hegel but does not answer the question. I think the notion of melancholic desire as a “staged loss” is very close to Žižek’s Hegelian notion of “absolute recoil” which is summarized in Hegel’s words: “What is thus found only comes to be through being left behind” (Science of Logic). So when Žižek describes the dialectical process, he is also describing the movement of melancholic desire:
an inconsistent mess (first phase, the starting point) which is negated and, through negation, the Origin is projected or posited backwards, so that a tension is created between the present and the lost Origin (second phase). In the third phase, the Origin is perceived as inaccessible, relativized—we are in external reflection, that is, our reflection is external to the posited Origin which is experienced as a transcendent presupposition. In the fourth phase of absolute reflection, our external reflexive movement is transposed back into the Origin itself, as its own self-withdrawal or decentering. We thus reach the triad of positing, external reflection, and absolute reflection. (Absolute Recoil)
The whole movement is melancholic insofar as it relates to an imagined Origin. How about the last step where the Origin itself is decentred? Would melancholy turn into mourning when the Origin is sublated? According to Žižek, the sublation occurs when it becomes obvious that the object never existed: “in the dialectical process the fissure is not ‘sublated’ by being actively overcome: all we have to do is to state formally that it never existed.” (The Sublime Object of Ideology) In other words, melancholy will turn into mourning the moment it is proven without doubt that the subject is indeed melancholic. The subject remains a melancholic insofar as (s)he does not recognize that (s)he is a melancholic. In mourning, the subject actually perceives the staging of his/her loss, and the staged loss is truly lost, the object is killed a second time: “once we are in negativity, we can never leave it and regain the lost innocence of the origins; in the “negation of the negation” the origins are truly lost, their very loss is lost, they are deprived of the substantial status of that which has been lost.” (Absolute Recoil) 
So what happens in mourning? To put it simply: In mourning, the desire is displaced. Mourning is the metonymy of desire. Thus the hysteric’s questioning of desire is equivalent to a desire for mourning. But haven’t we asserted that “every desire is a melancholic desire”? How is this possible?
To understand how melancholy turns into mourning, we must distinguish the masculine version “Every desire is melancholic except that” from the feminine version “There is no desire which is not melancholic, thus not-every desire is melancholic”. In the masculine version, a particular exceptional desire is protected from the universalized melancholy of desire. This is equivalent to asserting a “real world” in opposition to imaginary fantasies. When masculine melancholy turns into mourning, the exception will shift to another particular object and redefine his “real world”. In the feminine version, there is no “real world” stripped of fantasies, all there is is the reality of melancholy and fantasies, but this reality cannot be universalized because it cannot be delimited. Since feminine melancholy does not oppose “real world” to fantasies, feminine mourning is always present in her metonymy of desire. For her, “not-every desire is melancholic” in the sense that she can always shift her desire to another object, and this ability is what makes her desire “real” for her. One object is mourned and left behind only insofar as the next object also remains mournable. In this sense, masculine desire is static and feminine desire is dynamic.
Let us now return to Žižek’s negative attitude towards God and Nature. As Žižek himself put it long ago, an active renunciation of an object reveals the renouncer’s attachment to his/her desire for that object:
The gap that separates renouncing the desired object from no longer desiring it is immense: renunciation can well sustain desire. At its most radical, anxiety is not the anxiety of losing the desired object, but the anxiety of losing desire itself. (Did Somebody Say Totalitarianism?)
Likewise, doesn’t Žižek’s active renunciation of God and Nature reveal his actual (and we should add, melancholic) desire for these fictions?
 In In Defense of Lost Causes, Žižek says that he was mourning Lenin with these words: “To repeat Lenin is to repeat not what Lenin did, but what he failed to do, his missed opportunities.” (Revolution at the Gates) But such a staged losing of “missed opportunities” is still a case of melancholic desire. We begin mourning Lenin and Marx when we recognize that the history they imagined never existed.