Popular question, seems to have been covered here 1000x before. The M3 diff isn't a direct drop in replacement for the non-M diff. For starters, it mounts differently. You can swap most of the M3 rear end over to make it work though. For more details, you'll need to search out the numerous prior discussions of this subject. Lots of good info to be found. In addition to the LSD, keep in mind the M3 diff has a 3.62 ratio compared to your stock 2.93 (assuming manual transmission) which is a little short for a 6500 rpm red line. Also keep in mind there are aftermarket LSD options which would allow for you to select the best ratio for your application.
04 IR 330i ZHP | ESS TS2+ SC | MagnaFlow "headers" | KMS 3.64 LSD | AST 4100 550/650| APEX ARC-8 18x9 | H&R front sway bar | Vorshlag camber plates, RTAB limiters | TMS subframe & swaybar reinforcements | UUC SSK & DSSR | UUC TM & TME | BW motor mounts | Dinan strut & shock tower bars | vaio 4-bolt oil pump