Since you have KE jetronic fuel injection, I would start with checking for vac leaks. All the rubber bits on the hard plastic lines are probably about gone by now, so plan to replace most of them.
Especially check the idle control valve hoses, if they are leaking, you will get idle problems. The ones on my 88 300TE were actually rattling on the barbs, leaked terribly.
The click is probably the idle/ WOT switch. You will need to verify that it works both hot and cold, as the idle mixture and running mixture are different, and the computer may let the mixture go too lean at idle if the switch isn't working properly.
I'd also check the value of the temp sensor (for the fuel injection) as well -- if it is out of spec, you may have improper mixture hot.
1972 220D ?? miles
1988 300E 200,012
1987 300D Turbo killed 9/25/07, 275,000 miles
1985 Volvo 740 GLE Turobodiesel 218,000
1972 280 SE 4.5 165, 000 - It runs!