98 Honda Accord shakes and shuts off when coming to a stop?

I have a 98 Honda Accord LX 2.3 L Automatic 4 cylinder
When I start her up in the mornings her idle is horrible, the whole car shakes and there's audible rattling, the dashboard lights fluctuate from dimmer to regular, the battery light comes on and the car dies on me. I then start it up and it does it again. After 15 or so minutes, the idle problems goes away as the car heats and I don't have to worry about it until the next day.

The problem only occurs when my foot is NOT on the gas. It also occurs when I apply the brakes. ( I tested it, the car idled fine in my driveway, but the second I applied the brakes it shook and cut off). But it doesn't only happen when I apply the brakes, it just happens when the car at resting rpm.

It will drive like a champion forever, but when I pull up to a light or stop sign, the shaking begins and I have to put it in neutral and rev the gas to prevent the problem. Otherwise the car will shut off and I have to restart again.

I'm told it may be many things, either Idle air control (had a mechanic fix the IAC harness), vacuum leak, fuel filter, fuel pump, air in the cooling system, ignition switch, or the Main relay PGM.

Please help, this problem is extremely sporadic and only happens at random times, never consistently so I'm never able to show a mechanic the problem because it never occurs when they test it out.

When was the last time the vehicle had a proper service, not just fixing things when they go wrong?
New plugs, leads, filters (both oil & air also any in line fuel filters) all will help.

Hi so what do you expect from a 17 years old car might be the real issue here. Designed to last just 8 years or 100k miles beyond which it has lived on borrowed time. So given it's age this is not surprising. Engine wear lies at the heart of this problem.