Well engaging in the first place hasnt been the brightest thing to do (outgunned and no FC on the spot), but there... it was done -> learning experience
The only thing that might have saved you was seeing you were going down, disengage (stop all aggression towards the other party) and make to the gate. If you would have been lucky you would have been able to jump as soon as the aggression timer ended (60 seconds iirc). But I doubt you lasted this long