You can run away from melees while spamming Rapid Shots, hopefully proccing CGS and slowing the target. Throw in a Rail Shot when off cooldown and Thermal Detonator. Works many times, depending on proc rate, other cooldowns like Energy Shield and the enemies cooldowns.
Have yet to beat a PT Pyro though