On my way home from the Old City "pool" this morning I was stopped and asked to make a minyan. I couldn't daven with them because the do the whole thing in about 18 minutes and frankly - I can't talk that fast... If you go to that minyan and you actually think about what you are saying you will find yourself lagging faaaaar behind. If you sneeze at borchu they are done with shema. But I guess they are experienced daveners so they already know what they are saying and they don't really have to think about it anymore.
So I couldn't daven with them but I said that I'd come in and answer to kadish and kedusha and borchu. I took a chasidishe sefer off the shelf to keep myself busy and I saw a Zohar quoted that I wouldn't believe if I hadn't seen it. He gives the following moshol.
There was once a king who had a son. He wanted the son to display his powers of self-control so he hired a prostitute to seduce his son. The greatest will of the king is that the son withstand the temptation.
So too, Hashem sends us the yetzer hara to try to get us to do things we shouldn't but wants nothing more than that we control ourselves and not succumb.
The Satan is a malach and malachim have only good intentions. That is why the gemara says that the Satan is לשם שמים - he really has pure intentions. He wants us to be great. If we understand that we have the artillery to smash him.