Still Working On It
I have gotten into patterns where I have the same problem. Actually until recently I was doing this regularly. Most of the time I can now attribute this to my style of play and make adjustments. There are so many factors involved here that it is hard to say what will work best for you. There is no one strategy that works best all the time.
Recently I have picked up my aggression pre-flop with good hands. I'm generally a conservative fairly tight player. This picked up aggression has helped because it raises the pot pre-flop giving me a better chance at winning more. I have also learned not to over raise especially with hands like AA, KK AK and so on. Over raising chases out the players reducing the pre-flop pot size and the value of your hand. All ins with these hands are foolish also, they are not guaranteed wins. Get the flop and know that you are in a good position before you put your money on the table. Unless of course there are call stations all over the table, then I will go bigger (never all in) pre-flop knowing they are going to call with weaker hands.
Bad beats can change the way you bet and play if your not paying attention to how your playing.
For instance: I was holding A's flop dropped 2 3's and an A. I was in with 3 over betters. I checked knowing someone was going to go big and one of the other players went all in, I'm calling on my trips thinking he was on 3's. Bingo cards show he's on 3's. Holding a 3 8 unsuited. I made the right call as he's in on junk again. He hits the quad on the river.
Same table about an hour later. I have worked back most of my losses from my bad beat. I was holding AK suited flop gives me two suited possible straight showing. Bet is 2x blind I call to see the turn and bingo got the flush. No pair showing other player bets first and all in, he's either on the lower flush, straight, trips or trying to steal. I call, cards show he's holding trips 4's, river comes drops the table pair he's got the boat.
BTW same guy on both hands now has two of my buy ins. He was a complete call station playing junk and in on almost every hand and should had been an ATM to my hands but sometimes the bad beats are vicious. Even when you are doing everything right you will still get cracked and this can not affect your play.
I don't know if you are doing this but you can't play thinking this will happen all the time but now you have to work hard to get it back. What was happening with me was these types of bad beats would push me into being so bet conservative and playing so tight I wasn't getting it back when I had the chances. I was loosing hand confidence.
The above day was actually my wake up call. Only a few weeks ago. Since then I have tripled my bank at this site with a combination of tourny places and cash games. The only real change I made was paying better attention to my own play and catching myself if I started getting too tight or loosing hand confidence.
I hope my story helps, GL