The pumpkins are functionally the same except for a few mm on the front. This is made up for if your drive shaft is telescopic(M4 shaft is not for example). The only other notable difference between them is the diff cover, this will vary from model to model and yes, you need the right one or you'll find yourself requiring the use of spacers and extended bolts because the distance to the subframe is not the same on all models which use this diff. Also, the Z4 diff has a weird pinion snout, I don't know wtf is going on with those cars but its entirely different. It may just be a euro thing actually.
EDIT:
Speaking of euro, based on this feedback there must be some differences with euro cars and not just the Z4, their diff pinion and driveshaft-end looks different. I was selling an LSD to someone over yonder and this ended up being the reason the sale did not go through. I'm told it may actually be a stronger design, but if it works for them, I can say it works for both, so long as you're using parts which match, USDM driveshaft with USDM differential.