Just acceptance of the variance. It's kind of zen like of an approach and one I'm still working on but you just have to accept it.
Whenever I lose a big hand or even when I get lucky and suckout against a better hand to win I look over the hand almost immediately to see what I did, if I could have done something different, or if it was just a beat/luck. I've found recently analyzing my questionable hands right after the hand stops tilt in it's tracks and lets me focus on the math and my play of the hand. It really for me creates a sense of focus lately. If I did what I could and played correct and loss, sucks but that's poker. It goes both ways.
Also tilt control, good BRM, and patience. It can take someone a long time to get those aspects down. That's ok. You have to learn from the mistakes.
And as you said, play more. As you play more (not during tilt) you see beats going both ways, you see more situations you can analyze, you learn more. The swings happen, they're frustrating but they're just a part of the game.
It's not uncommon to bust out of the money in dozens of tournaments in a row. It's not uncommon to lose 3 BIs in a few minutes in a cash game. Hopefully these are rare streaks for you but they do happen. And they do happen a lot worse than that sometimes.
Going back to analyzing a hand after it's played when there is a doubt about your play in that hand for example: If you raise pre flop and are the aggressor in position and the flop comes down blank, checks to you and there's a flush draw you C-bet and the person calls. Turn is a blank for you and the no flush has appeared yet and board is otherwise safe, do you fire another c-bet? Is it big enough to take the pot? Or do you give up, check, river makes flush, you fire a bet only to be met with an over the top check shove? And you see the flush made by villain. It's cases like this that require acceptance and analysis of mistakes we make in our play. If we had bet hard on turn with our A high or decent pair we might have shut down the flush draw or at least given them horrible odds
to call which is profitable long run if they keep calling.
Taking that second or two after a questionable play to analyze the hand is for me a HUGE part in why I've improved my game greatly and feel confident in my game even though I still have work to do. And sometimes you do everything right and still lose the hand, bust the out on the bubble, or watch hours of cash game stack building get swept away in a one outer suckout.
Focus on what you can do to play your best one hand at a time.