To easily defeat the Thresher Maw, after it has initially launched out of the ground to drive off, stay at a relative distance and drive circles around it while firing. Due to your distance, it will not use its long-ranged attack or inflict melee damage. It will go back underground after a time or when certain amount of damage is inflicted and will change location where it pops up. Repeat the circular attack and you will get away undamaged.