Id say either the fuel pump or throttle body is the problem. I had a similar issue with my e39, turned out that it was the fuel pump but the symptoms were all consistent with a throttle body but no, it was the fuel pump.
It did make a bit of a whining noise when ticking over though.