1983 bmw 320i
I have the same problem, I just haven't gotten around to fixing it - Theres three very typical causes, the cold start valve, thermo time switch, or fuel pump. Check your Thermo Time switch, located on the top front of the engine, it a temp sensor that tells the engine computer how much fuel to use for things like cold starts, if its bad it can in theory cause the problem we're having, it will cause rich running when it does finally start, and lean running on start up (not enough fuel, which explains for me why it starts promptly and dies a second or 2 later, the cold start valve is the only thing helping it get enough fuel). The part typically costs around $90 (thermo time switch). The thermo time switch should have between 2000 and 3000 Ohms of resistance between its terminals at 68 degrees F. Check it when its very near that temp. Also, you may wish to do a "leakdown" test, which involves testing the fuel pressure near the fuel pump. The "i" models have 2 fuel pumps, one in the tank (primary) and one outside the tank (secondary). The primary supplies low pressure to the secondary, and the secondary supplies high pressure to the engine. Off the top of my head i cant tell you what the pressures should be, you'll need a haynes manual or the Bosch Fuel Injection manual to know for sure. But if it does drop sharply after start up, you either have a leaky Cold Start Valve or a bad fuel pump. You can also check the Cold Start Valve by pulling it off and putting it in a glass jar (lines attached), and just "start" the engine, watch to see if its spraying. If it is functioning properly it will only spray when the key is in the start position. If it doesnt spray at all, its probably bad. If it leaks when the key is in the "on" position, then it is bad.
Hope that helps