Bad beats and suckouts are just part of the game. The more volume you play, the more often they happen.
The only real fix is taking care of your mindset, not tilting, keep studying to make good decisions and just keep putting in volume.
Being as confident as you can be for that hand, which means you must have studied all the informations and act correctly! Of course you will not avoid the unpleasant results they are in the game.