Mazda Repair Questions? Ask Mechanics for Answers ASAP
Most of those codes are related to the EVAP purge solenoid- p0442, p0455, p2187. These codes shouldn't affect the way it runs.
The P0401, p0403 codes indicate a stuck EGR valve. What was pointing you towards a new transmission?
You would normally have at least a p0700 code if there was a TCM problem.
Try unplugging the front O2 sensor and drive it and see how it acts.
If it makes no difference with the o2 sensor unplugged then unplug the EGR and drive it.
Most likely replaced, but it depends on how it runs with it unplugged. Did you try unplugging it?
I wanted to check and see if you needed any additional help.
Please don't forget to rate. That's how Just Answer compensates us for our time.