First Edom, then Eden: The Primordial Kings of Strict Justice
31. These are the kings who reigned in the land of Edom, before any king reigned over the Israelites.
This elliptical passage, which summarizes the family line of Esau, is a narrative deadend that inexplicably interrupts the continuing epic of the blessed son, Jacob. But its very oddity and obscurity invites occult explanation.
In this case, the mystics read this not as a account of an ancestral branch off from the tree of Israel, but as a cosmic revelation, a allegoric telling of what preceded creation (Zohar III: 128a; 135a-b; Sefer ha-Gilgulim 15). The hermeneutic key is the phrase, "...who reigned....before any king reigned over the Israelites." The "king" here is taken to refer to the God of Israel. Prior to this creation, then, there were forces that disrupted God's effective rule of the earlier worlds. The references to the 'death' of each king refer to God's undoing of these worlds. What was the fundamental flaw in these primordial worlds? They were dominated by edom, "red [blood]." This means these worlds were too filled with strict judgment and lacked the balancing [matkela, in the language of the Zohar] quality of mercy in sufficient proportions for the cosmos to endure. Some interpret this overweening judgment as the meaning of the "darkness" that existed before the light of creation (Galya Raza MS II, 102b).
To correct for past mistakes, God ensured this world would continue by introducing Abraham, who embodies loving mercy (hesed), only then followed by Isaac, who personifies justice (din), as does his first son Esau, who was born 'red' (Gen. 25:24), but finally harmonizes the two forces with Jacob, the ish tam ("perfect man" - Gen. 25: 27), which is why, the kabbalists reason, the earlier failed worlds get recounted in the midst of his saga.
And why in the last generation of Edom do we hear about Hadar's wife, Mehetabel, when no wives merited mention before? The last iteration of judgment, it seems, has a 'feminine' counterpart, which makes it balanced enough to not 'die' but to serve as the basis for judgment in this world:
You must know the that [this] world is founded upon the side of of the feminine and that heaven is revealed on the side of Darkness...and that its descendants [the earliest stages of divine creation]....they are ruled by that side which has no shame...and that is the prince of Esau, and therefore the Blessed Holy One established this world on the side of the feminine....(Galya Raza, MS II, 12b-13a, as translated by Rachel Elior)
So despite the damaging nature of pure judgment, mercy is not to be considered superior to justice, but its complement, as it says, "Do not hate the Edomite, for he is your brother" (Deut. 23:8). Jacob needs Esau, even if they are in conflict. Strictness and forgiveness, justice and mercy. The world requires a balance between these qualities for it to succeed.
Zal G'mor: To learn more, consult the Encyclopedia of Jewish Myth, Magic, and Mysticism - http://www.amazon.com/Encyclopedia-Jewish-Myth-Magic-Mysticism/dp/0738709050
 Scholem, Kabbalah, pp. 116-117; On the Kabbalah and its Symbolism, p. p. 112. Also see Elior, "The Doctrine of Transmigration in Galya Raza," pp. 248-249.