318i, got it.
I see you found my master misfire thread!
What is sounds like is you are getting cylinder misfire with cutoff? This is why when you turn the car off and restart, it runs fine for a bit.
Since the car is a 2003, the ODC connector should be in the cabin, not sure if it is on the steering wheel side or not? You probably have the steering wheel on the WRONG side!
See what codes you can pull, they may be helpful.
Does the problem happen when the car is warmed up?
Does the problem happen at idle?
Does the problem happen under load?
Could be a lot to things, I would probably start with the basic maintenance issues first like replacing spark plugs and spark plug boots if the age is unknown. Check for oil in the spark plug wells.
Also check my signature below for the "Hidden OBC Menu" and look at charging Voltage and intank fuel transfer for some other ideas.
The 2nd link below in my signature will give you fuel pump info.