It is not just online poker, its poker.
Like every poker player you just had to accept that bad beats happen, the fact you suffer bad beats means you are getting your money in good, which is all you can do, the rest is up to the poker gods, there is nothing you can do.
In the end if you get your money in good you will be a winner, once you have had a bad beat either forget it or take a break, doesnt matter how much you analyse the hand or curse your luck the hand is gone. The more poker you play the more bad beats you will suffer.
I used to go on dreafull tilts after a bad beat and end up losing 10 times what I lose in the bad beat, these days I just shrug my shoulders and say " oh well, it happens."
Its hard to do but one a hand is gone its gone, move on, and good luck