Because it dies when you apply the brake at near idling speeds, it may be vacuum related. I would double check all vacuum hoses for cracks, breakage etc. The reasoning behind this is your brake booster works via vacuum. That elbow where the hose goes into the booster is actually a check valve.