After a quick search, I believe your O2 sensor (also known outside the US as a Lambda sensor, like Storamin said) will be part #11781734393. But verify this at www.realoem.com
. Just enter your vehicle information, and you can look at all the parts in detail. To find your vehicle's production date, look at the sticker on the driver's side door; there should be a month/year of manufacture.
You can also read the OBD fault codes to narrow down the problem. To do this, go to http://www.pelicanparts.com/BMW/tech...de_Reading.htm
Hope this helps, and let us know how things go