Any E32 or E34 M30, the late M30, will fit. Swap your current engine harness over to avoid any EML incompatibilities.
Theoretically, I guess you could also get an E28 or E24 motor. Not worth the necessary modifications to get it installed unless it's an S38B35, though.
EDIT: what's wrong with the current engine, anyway?
best, whit