The Zohar, Chapter “Tazria (When A Woman Delivers),” Item 95: This is when the sinner gives strength to the Sitra Achra (evil inclination) to extend from the left, from above downwards [meaning egoistically], as did Cain. Then the serpent, called “sin,” which crouches at the door of Malchut, discloses the first point, which is hidden in Malchut, and all the lights depart from the root of the soul of the sinful person…
A person starts his correction from the lowest critical point when the serpent and Malchut, which is unable to receive any Light, are revealed. This serpent has a very important mission. This is why “the sin crouches at our door” is written in a good rather than in a bad sense.
The Creator prepared a serpent to help us enter the spiritual world. The serpent causes us to make the most basic revelation: that we are unable to receive the Light inside our egoistic desires. Don’t even try; you will be beating your head against a brick wall and will never succeed. Leave your egoistic desires because you won’t be able to do anything with them. You have to rise above them in order to “leap” above this world. This is what the serpent is explaining to a person.
The serpent comes like an angel sent to us by the Creator in order to push us towards correction. Yet, we should be grateful to the serpent for its help.
This snake comes as medication; indeed, it is not a coincidence that the snake is a symbol of medicine and poison is the basis of all medications. The Creator guides us using bites from the two serpents until we suddenly feel the nature which is above our own. We then understand that we have to rise above both of these serpents, thereby finding the One who governs them.