The rough idle on my m3 was caused by the fuel pump. I got a new HRC one on eBay which is a direct replacement
http://m.ebay.co.uk/itm?itemId=261597211641