The problem with your CD drive is very likely a power supply problem. If there is some AC on the DC lines or the DC isn't stable or low it can give you problems like you're describing. If you have a multimeter you can test the 5 VDC and other lines and see if they are stable or low. You can also put the meter on AC and see if there is any AC voltage on the DC lines.
You can get a cheapo multimeter for around $ 10. Auto parts stores sell them and RadioShack or the internet.
A bad power supply could cause problems all over the place so it would be good to check it. Even if it checks out OK if you have a multimeter you'd be prepared to check it in the future. None of the voltages that a computer power supply puts out will hurt you. There's 5 volts DC + and -. 12 volts DC + and - and 3.3 volts DC typically. You can put the negative lead to the frame and use the connector that goes into the back of your CD-ROM drive to check for the voltages. A multimeter may not be able to see an irregularity in the voltage that is causing some problem though. An oscilloscope could but I wouldn't recommend that you go out and get an oscilloscope.
They make computer power supply testers
http://www.911forpcs.com/atxposutefrs1.html
And if you need a new power supply for your computer the best deals are on the internet. The same site has quite a selection and very good deals.
http://www.911forpcs.com/powersuppliesb.htmlBut then maybe your power supply is doing just great. The door opening and closing like you describe sounds like a typical power supply problem though.