I have the same issue, replaced a bulb, seal was old and the passenger side on let water in, not just condensation it had a lot of water in it.
I have factory fitted xenon headlights.
I opened it up and used a hairdryer to speed up the drying, after that I replaced the seal with a new one.
Unfortunately the water had destroyed my control module found under the headlight. Well I think it's this that's failed, I've tested all the other components and they work.
Light was flickering and now wont come on anymore.
Anyway I have a new control module on the way to be fitted in the hope it is the bad component. I am going to try non setting silicone around the seal to prevent it happening again.
If I do need to replace the headlight assembly, can I buy one off ebay for example and have it fitted even though it's not xenon? I want to know if I can buy two new headlights that aren't xenon and whether it is possible to have them fitted working with my car?
The reason I ask is that xenon ones are hard to come by, and BMW want about £1500 per headlight :-S. I bought my car for £3200 last year :-(
These are the headlights I would buy but in the description it says not suitable for factory fitted xenons. Surely an auto electrician can make these work with my car?
http://www.ebay.co.uk/itm/BMW-Z4-03-08-BLACK-PROJECTOR-STYLE-ANGEL-EYE-HEADLIGHTS-/361724251742?hash=item5438720e5e:g:seQAAOSw-kdX1Rj8