If TPKs happen a lot in your campaigns then you might want to take a step back and assess how you approach things but you should not beat yourself up if they do happen on occasion. If the players are having fun a majority of the time they will quickly get over something like this. The possibility of character deaths is what makes tense moments exciting in this game. You can either move forward with a plot twist as others have suggested or move on no harm no foul with some lessons learned.