Well you are already on day 4, with Xanax only, and that in itself is awesome. Just keep taking the Xanax for a few more days . By day 6 you should be feeling good enough to stop taking it. You can get hooked on Xanax so be careful about dosing, and for how long.
Lunesta is ok for insomnia, but from my experience and others, when detoxing, you need something a little more powerful like Ambien, Valium or even Halcion. Just to get you through the first week.
You are pretty much doing it right, but you have to give it at least a good week. Depending on your drug usage (how much, how long) it may take bit longer.
Just be sure you are getting a lot of fluids. Cleansing your system is vital to the detox process.
Also, you need to stay away from processed foods and garbage that will make your system work hard to digest.
Read this. It's a good guide to detox, and also look up the Thomas Guide that's floating around here as well.
http://www.medhelp.org/user_journals/show/2899
You are almost through the worst of it. Just keep going and I promise you will start to feel better soon. Your body is going through withdrawals, and has to adjust to not getting what it is craving.
Good luck. You are on a good forum you know. A lot of us have gone through some pretty crappy detoxes. So post away, it may make you feel better, and pass the time.
-J