I had a similar problem with my 85 500SEL. The reason it runs better when you disconnect the idle stabilizer is because it does not have any way to control it then. If the rpm's increase when you disconnect it, then you know it is not the idle stabilzer that is the problem. If you have a multimeter, you can check the circuit to see if the electronic idle control box is working.
I would check the operation of the vacuum control solenoid. It is the the little thing that is next to the fuel distributor that "buzzes" when the car is running. It creates a controlled vacuum leak in the intake. If it is buzzing then it probably is fine.
The big thing I would look at is vacuum leaks. that turned out to be my trouble.
1985 500SEL (260,000 miles) SOLD!
1974 280 SOLD!
1994 Volvo 850 Turbo Wagon (Yuppie Ice Sled)
"I know I have a Benz and they know it too." If you start bragging about it or shoving in people's face, you then become a Wally; especially to the girls.