There are threads here reporting similar symptoms. I suggest a search (keywords: fuel, stall, etc.)
My TD4 suffered from the symptoms you describe, but it never stalled while running.
Turned out it was the fuel pressure sensor (on the left side of the engine, below the exhaust manifold)...