It sounds like it's too late for this now, but the correct move after receiving the "official" offer and disappointing answers from HR would have been to go to your new manager (or whoever had decided to hire you for the new role), and ask them to get the offer fixed.
As others have mentioned, HR is not really your friend in this situation, and they're unlikely to bend policy for you — they don't have the authority to do that unilaterally. In reality, I'd argue that HR is most likely not the proper place to lay blame for your disappointing outcome. It's important to understand that HR are bureaucrats who implement the rules with little flexibility, and must act as directed by the business.
On the other hand, the manager of your new team has interviewed you, liked you, and wants you on their team, so they are motivated to take action to close the deal.
Make it clear that you're very excited to take the new role, but the offer presented by HR is unacceptable because you interviewed for a more senior role, not the junior one offered, and you're not willing to take the pay and/or title cut. You'll happily sign the offer you expected, but as it stands, you'll have to turn it down.
It's then your new manager's job to get someone with enough sway (whether that's themself or their manager) to make this a "special circumstance" and have HR give you the offer for the role you interviewed for and want.
In most cases, a good manager should be able to make this happen for someone they want for their team.
Unfortunately, by simply declining the offer after speaking with HR, you gave up any leverage you had, leaving you in the situation you now find yourself in.
One thing you'll need to accept is that this was ultimately just business and it was a negotiation, and — I don't mean to be harsh but this may be hard to hear — you handled it poorly.
Yes, a great company might have offered you the senior title and more money immediately, but businesses generally aren't in the habit of giving money away; you have to push for what you want and understand how to get it. In fact, they may have opened with the "bad" offer fully expecting you to negotiate it, and were surprised when you just said "no thanks".
So you could reframe your thinking about this situation to be less "I was treated poorly" and more "this was a (painful) learning experience about how to negotiate and get the terms I want". I imagine this will be the only way to get over your resentment and continue working for this company.
Otherwise, it's time to start looking for a job at a new company.
As for what to do with your current manager, the best course of action will really depend on several factors: how good of a relationship and how much trust you have with each other, how he's likely to react to finding out you were looking to leave his team, and whether you decide to find a job with a new company or try to continue with your current one.
The risk that you've (correctly) identified is that he will hear that you were quietly taking steps to leave his team and this will damage your standing with him. This could be simply that he takes note that you have one foot out the door and so he stops giving you the good assignments in preparation for your departure. At worst, there could be actual hurt feelings and/or he actively moves to get you off his team.
If you think your manager is likely to react poorly to this news and you've decided it's best to move on from the company anyway, then having a conversation about this situation will not be very productive. Look for a new job, do your best in the meantime, and part ways amicably.
However, if you want to try to fix the situation in your current role and think that you can have an honest conversation with your manager, you should do that. I'd frame it as asking him for advice on how to grow your career. A good manager will understand that their employees want to grow, and a great manager will very much want to help them in that endeavor.
You can use this conversation to tactfully explain what happened and why you've been off your game lately, apologize for that, and get his advice on how to grow — both at your company and in general. He'll likely have insights about how your company specifically works that none of us can, and can tell you the best approach for growing with the company (and hopefully even actively help you along that path).