let go of gas, car dies on 1992 BMW 318i

I'm having an odd issue that I can't figure out. It started a few weeks ago, when I tried to start my car and it wasn't giving way. After a few trys and some gas presses I got it to start again. After that I would occasionaly have the issue. My dad suggested it was the battery. So I went ahead and got a new one. I swapped it in, and started my car to find that the neutral rev was 1.5 thousand rpm. It is normally supposed to be 1 rpm. Anyways it worked fine, but later that day as I'm driving in city traffic, whenever I stop the vehicle and pull into neutral (mine is a manual transmission), the rpm drops down to 0 and my car dies. I can restart it (by doing the same gas trick), but it shouldn't be dieing on me. Now when I drive, I have to hold the gas at stops, and since I'm on stick jumping between clutch, brake and gas is crazy. Another thing to note is that the battery doesn't die, because my clock doesn't reset.

Any ideas would be great. Do you think the guy at the store gave me the wrong battery?

Thanks ahead of time.

Asked by for the 1992 BMW 318i
The battery isn't our concern when the car is running and stalling
If the vehicle is fitted with a flap type air flow meter, the flap inside commonly stick causing all sorts of issues.
Best to get the car diagnosed by a BMW dealer
2 more answers
you should also check the condition of the hoses on connecting the idle control valve
Sounds like the Mass Air Flow Sensor. Does your vehicle die while making turns at idle speeds?