we have the same engine (M102) and your problem might be the idle control valve. if you would like to take a look at it it's under the air cleaner and positioned between two intake manifolds. it's a common problem in the 124 body type, i think, most especially the earlier models.
do a search in this forum for idle control valve and it will give you the answers. I got mine in this forum. Yours might be cured by simply cleaning it with carb cleaners or better yet change the darn thing all together. Probably cost you about US$140.00 brand new. I bought a second hand and it cost me half of that and my idle stabilized after that. No problem so far.