Stop driving it!
The first thing is to verify that the fan kicks in if at all. If you open the hood when the temp gauge is high up and the fan isn't spinning at a good clip then you are looking at either a fan switch or thermo clutch problem. The fan switch would be my guess and it's cheaper.
If it is spinning then get the thermostat replaced pronto!
If everything above checks out and there are no leaks in the system then have your radiator flushed or replaced.
Bottom line is get this fixed quick because if that gauge redlines your going to need good credit.
88 230e(W124, M102engine)