Deserve has nothing to do with who lives and who dies.
Wrong is neither a proper subset nor a proper superset of illegal, and God does not deal in legalities.
Was it wrong? If it was, none of us here can give you absolution. If you're a Roman Catholic, only a priest can do that, if you're truly sorry. If you're a Buddhist, only you can.
I am not “sorry” for my actions. Just conflicted. It really was an extraordinary situation.