You may have more than one problem. You need to have the idle circuit checked. The overvoltage relay is the first thing that comes to mind.
If the A/C goes into limp, it will act weird. There is a feedback potentiometer that sends voltage to the control unit. If the voltage is wrong, the control is nutty. Check for a vacuum leak under the air cleaner and under the battery.
1992 500E (very soon I hope
1981 280GE SWB
ASE CERTIFIED MASTER AUTO TECHNICIAN
SERVICE MANAGER FOR 14 BAY FACILITY
MERCEDES SPECIALIST 8 YRS
PARTNER IN MERCEDESSHOP.COM