Two possibilities, 1 is way more possible that the other. It's either the
idle control valve, or the idle control unit. I say there's a 95% chance
it's the idle control unit. I know on the 1985 380SE its a black box up by
the firewall, but for some years it's behind the glovebox so yours might be
there. It's a fairly expensive part, so you might want to get a used one (i
got mine from pgauto.com) or look for a refurbished one.
Motorsforum.com is a website by car enthusiasts for car enthusiasts. It is not affiliated with any of the car or spare part manufacturers or car dealers discussed here.
All logos and trade names are the property of their respective owners.