I probably would have stayed in for the flop but folded when he went all in – even with trips. Why? 2 heart flop. Sure, trips are pretty, and a flush is not guaranteed, but I'm just paranoid like that.
It's a hard call and you did not do "wrong." Definitely a bad beat... sorry. :(
Cat