Your first problem is one of perspective, and it's one you need to get over. Your boss now needs to manage a division he only knows half of. If he gives all of the leadership roles to the people who happen to be from his old division, then the folks from the new division will have strong reason to feel resentful, and rightly so - they'll assume he's playing favorites. That's especially the case if he puts someone like you (with only 6 months in) in charge of someone who's been there for years. He's doing what he can to faithfully execute the duties of his new position, and right now, that means being as visibly fair as he can be so as to minimize the inevitable morale damage. If anything, the people who did this to you were the ones who decided to merge your two organizations in the first place.
Now, you feel frustrated, and that's an entirely normal thing to feel. You clearly went above and beyond in the time you were there, and you had some hope that that meant you were building up some social credit with your boss. Now you find that that social credit wasn't enough to let you stay at the top of your team when it was your boss's call. Worse yet, they're not going to be your direct boss anymore, which means that the social credit just isn't worth as much anymore, and if you want to have that same sort of relationship with your boss again, you're going to have to build it fresh with this new guy (who you might even resent, at least a little).
Unfortunately, none of those instincts will help you here, but it's important to acknowledge them and admit that you have them (to the degree that you do have them) so that you can move on and not let them poison the situation you're in. No one has actually betrayed you. No one has wronged you. Sad as it is, the entirely normal bitterness you feel right now does not serve you. It can only make things worse.
My suggestion? Treat it (emotionally) like a job change. Your entire division was laid off by higher-up, and you managed to get a job in the new one. You have a new boss and a new role with at least somewhat new responsibilities. Try to approach it fresh, and give yourself some time to settle in. If you find that your new role and new boss are working out for you? Great. Stay where you are, get some more seniority, pick up some more social credit, and see if you can't make the next realignment be a bit more in your favor. If somehow your boss or your new role are simply intolerable? That's when you start thinking about leaving early... just like you might with any new job that turned out to be intolerable. Even in that case, though, you should try having one last talk with your now-boss before you go, explain your problems, and see if he can help. It's not like the social credit you've built up is worthless.
Protip: the only time you go to your boss's boss to fix a problem without having gone to your boss first is when your boss is the problem, and you have strong reason to believe that talking with them about it won't help.