1999 Mitsubishi eclipse 2.0 gs n/t car shuts off

This is probably the weirdest thing that has happened to my car. Sometimes when I turn on the car it just shuts off. Other times it shuts off when I come to a stop. I have noticed that when it doesn’t shut off is when I keep it accelerated. The check engine light comes on and feels like its going to die. I have recently changed the ECU. I noticed it has been acting up like that afterwards. It does drive a whole lot better than before though. These are also some of the recent changes I have done.

Oil change and filter
O2 sensors
PVC valve hoses
vacuum hoses
spark plugs and wires
fuel filter
fuel pressure regulator
put a fuel injector cleaner in the tank
fuel pump
air filter
coolant temperature sensor
idle control valve
intake air temperature sensor (IAT)
intake manifold gaskets
brake booster hose

Thanks in advance