Despite what BKN advised, I would look for a lawyer. Not to sue, but to help see what your options are. Just don't tell anyone that you have hired a lawyer. You have invested way too much time and money to this career to quit without putting up some kind of fight.
Would the program director help you look for a different residency? You say that you don't think you picked the right specialty. Maybe you program director would agree, and be willing to help you get into another residency. Were there other faculty who were supportive of you? Will they help you look for a different residency? You could also talk to the medical education department (that oversees all the residency programs).
Don't be defensive, though. The natural instincts of people in medicine are to help (usually). If you start blaming the program director for anything, you will lose any goodwill you may have developed.
As for insurance/sleep study, see if you can't be put under cobra. I think you have so many days after you leave to enroll. It may be somewhat expensive, but you can get the sleep study done to help support your case.
Good luck with all this. I know you are probably feeling like crap right now, but you have to pick yourself up. No one else will do it, and the longer you delay, the harder it will be.