Got it. Whichever head you use, bring it to a machine shop to check and machine it. It'll cost you ~$100 but it's well worth it before you put it back together. Your best combination will be to use the M52 block, either head, and the M50 intake, and all your M50 sensors and wiring. Basically an OBD1 2.8L. Should be good for a nice increase.
2007 BMW 328Xi Touring, 6 speed