Unless you are Jeff Bidoli, regearing the diff will be more expensive than buying a good used unit. Even if you are JB, it requires a bit of expertise to build one of these things, and regearing it basically means rebuilding it.
It is likely that your car has a 3.91, but it may be a 3.64 if you're not in the US or Canada. The upgrade for automatics is a 4.27, which you'll find in any 535/735 automatic from '91 to the end of production.
You could also try a 4.10, which any automatic 525 '91 and up uses, but it won't be as fast as a 4.27.
Any non 750/740/M5 E32/E34 differential will bolt to your car.
I have a 4.10 LSD coming out of my touring. I am going to a 3.23 when I can find one, and the 4.10 is for sale.