I had to replace my tank this spring because I was dropping gas in left hand turns at the track and my fellow students didn't appreciate the added challenge of cornering on raw gasoline. "Will the owner of the 5 series with the trailer hitch please check your gas cap." I ended up finishing the driver school by running exactly 1/2 a tank of gas. That minimized both spillage and fuel starvation, which I experience anyway with less than 1/2 a tank. Time for a fuel cell.
Anyway, I guessed that the fuel leak was due to the typical E28 filler neck rust and was right. Moist dirt and road junk collect on the tank right around the filler neck which is the perfect breeding ground for rust. The filler neck was actually perforated in several places.
To remove the tank, remove the fuel lines from the filler plate underneath the access in the floor of the trunk. Also remove the electrical connectors from the fuel pump and level sender. Open up the fuel filler door in the side of the car, remove the filler cap, and pull out the rubber piece that surrounds the filler neck. Now you can see 3 small lines hose clamped to 3 small fragile looking pipes which are part of the tank. These 3 lines are difficult to remove. If you are replacing your tank, you don't have to be gentle about pulling them off. I think I ended up cutting the line off of one particularly stubborn pipe because it looked like there was enough line left over to reattach to the new tank.
If you haven't run the car until it is almost out of gas, I highly recommend draining most of the gas out of the tank. There is a drain plug on the right front lower corner of the tank which uses a crush washer to seal. I think it took a 5mm allen wrench to remove the plug. Try to keep the drained gas out of the nice cars. Save it for the Oldsmobuick and the lawnmower
DO I NEED TO REMIND ANYONE OF THE DANGERS OF AN OPEN DRAIN PAN FULL OF GASOLINE? HOW ABOUT THE EXPLOSION HAZARD OF A CLOSED METAL CONTAINER FULL OF GAS VAPOR?
Before loosening any bolts, put your floor jack under the tank to keep it from ventilating your skull. I believe there are three bolts holding the tank off the ground. One bolt may be partially abscured by the exhaust so you may have to loosen or remove hangars to get to it. I had to move my exhaust a couple inches to drop the tank. You may also have to remove the right side swaybar bracket. There was a bent metal clip under the swaybar bolt in my car which was blocking the tank. Remove the bolts and lower the tank. Installation is the reverse! This would be a good time to replace all those dried out fuel lines in the back half of the car.
I had a decent tank from a garage kept 528e which happened to be sitting in my driveway. Upon tremoval of the 528e tanks, I found a litle surface corrosion but nothing that caused great concern. The Maximillian price of $220US for a new tank is very good so I suggest buying a new tank instead of throwing a rusty disaster-waiting-to-happen into your car.
P.S. This procedure is identical for E24 and E28 cars.