The first thing to do is upgrade your door subsystems to the second level. That slows them down a little.
You can also soften them up a little by venting any convenient outside doors you have near them. Neither your guys nor theirs seem to take any damage until they are in complete vacuum (red stripe tiles). Their behavior changes when in vacuum; they seem to aim for the first occupied room instead of their usual favorites. If you can snooker them into the medbay, especially an upgraded one, you can either kill them or force them to zap out, but they can still kill severely wounded crew who wander in.
Once, on a Kestrel, I managed to entice two Mantises into the medbay by evacuating their room and then opening all connecting doors to the medbay, while still leaving the outside doors open. Rather than break in on my pilot, they ran for the open room with air still in it., on the far end of the ship.
There are also a couple of weapons which allow you to target your own ship, but I don't remember what they are. The best way to whack 'em is to have two of your own. Once they level up, they saw through lesser Mantises like lesser Mantises saw through humans.
I have also managed to die trying some or all of the things above, which I agree is part of the fun.