I'm with Big Evil on this one, plus I'd invest in a cheap OBDII scanner scanner software package. Your car is definitely dying under load. Sounds like you may have solved the air issue (for sure, after a smoke test), but you need to investigate fuel as a vacuum leak isn't as much of an issue under acceleration (more vaccum at idle).
Take your car to a shop and (along with the smoke test) do a fuel pressure test. I'm not sure what YOUR pressure should be, but on M3's for the same year it's 51psi (mine was at 45, but I'm sure yours would be lower on a 318). A good test is to crimp the return fuel line while the car is at idle. The pressure should jump up (Because you're inhibiting the fuel pressure regulator). If it doesn't, then it's your pump. You've already replaced the fuel filter, which is the first thing I would have recommended.
Not to get too drawn out here, but if you're running short on fuel during hard acceleration, the OBDII software will be able to tell you trim values at different Throttle postions/RPM's and help you narrow down your diagnosis.
Check out my post here: