First of all you need to ask yourself, why this even tilts you? Aces versus kings is the most classic cooler in poker, so its not even like, your opponent did anything wrong. If you had kings, and he had aces, all the chips would also have gone in, and then you would also put a bad beat on him one in five times. So why does this even matter? And would you rather be the guy with kings, who ran them into aces? Thats also pretty unlucky right? The point is, losing is part of poker. Someone has to lose every single hand, so why get upset about it?
Now to be honest all poker players hate losing. But if a hand like this upsets you for more than two seconds, this is something, you need to work on, if you want to succeed in poker. And other than thinking rationally about it, like I outlined above, the main thing is to fully embrace the fact, that poker is a long term game. It does not matter, that today your AK lost to KJ a few more times, than they should, because in the long run this really will level itself out. So all, you need to do to succeed, is getting your decisions right. As long as that was the case, losing is totally cool and fine.
Another tip, if you are new to poker, is to start with the formats, that have the least variance, which are cash games and single table SnGs. Losing a hand in these formats tend to not sting quite as much, since you just move on to the next hand or register for the next SnG. Whereas in MTTs it can be hours of work, that goes down the drain, and this requires a bit more mental stamina. Its also really best, if you can play 3-5 MTTs at the same time, so that the result of the entire session is not totally dependent on a single hand like this. And multitabling is something, which also need to be learned, and is not very good for beginners.
The alternative is to play in a truly recreational way. Play for fun. But then you really should not tilt, and it also makes no sense talking about "having to play later in the day". So first of all find out, why you are playing. And if its with some kind of goal of eventually making a bit of money out of poker, then understand the long term nature of the game, focus on improving your game and stop caring about short term variance and results.