I've been through similar experience with my Pajero Mini and my elder bro's Cultus.
TPS (Throttle Position Sensor) is there to set the idle speed, and it also gives signal to accelerator pedal person is pressing to computer.
TSP works with ISC (Idle Speed Control) valve. This is a motor which actually controls the idle speed, and this is the thing you should investigate.
In my Pajero Mini's case, the ISC motor's coil was burned, so it wasn't working and doing same you mentioned, idle RPM goes too low on AC / Lights / etc. Additionally, it burned 2 ICs in computer, so I had to replace the ISC, and my brother repaired computer by making clone ICs.
In Cultus' case, the ISC was not working correctly, and when car was idle RPM would jump up down randomly. I took it to mechanic, who replaced ISC with an used spare one he had. It fixed the issue.
So, in your case, first thing is to check the ISC which is mounted on throttle body with a big connector. Check its coils with multi-meter. If resistance is 0 its short circuit, and if there's resistance, its open circuit. You need to replace the ISC.
Second, check the car computer. Get one from a shop who can offer return if your's is not damaged. Replace it with yours and see if new one is working okay. Before this, make sure ISC motor is not damaged, or else it can damage the new computer too.
Good luck 