The best way to not lose a fight that you would inevitably lose is to avoid having the fight in the first place. If you know that the odds are completely stacked against you to win, then figure out a way to win without that fight. Change the game, refine your definition of win and focus on your new goal.
Far too many people are desperately unhappy in their jobs, feeling indignant that they have been wronged, but stuck and unable to get out of their rut. They become negative and turn into people that the employer really doesn’t want around anymore. They are seen as complainers, rabble rousers and undesirable team members, That’s a losing fight. Your employer ‘wins’ every time. Don’t pick that fight. Don’t expect that just because they don’t appreciate you (but that they ought to) or that they don’t see how much you have done for the organization over the past years (but that they ought to), that they will.
The medicine for unhappiness at work is (caveat: if you are being abused, please get professional help right away): Accept the things you cannot change, change the things you can change… or get the heck out of dodge.
If you do not feel that you can accept what is happening at work, look for opportunities to break the cycle, change the dynamics, set the tone and lead the way. Find a way to see the virtues in people you don’t get along with. Find ways to agree (authentically) with different perspectives. Offer to do things in a new way. Open up your mind and heart to things that don’t necessarily make sense to you right away. Calm your anger and hurt to try to see the lesson in the experience. Try to understand why a manager might have to disagree with your assessment of the situation (they have to consider more complexities like politics and budgets). See how you can make their jobs easier rather than harder. It can be difficult in the beginning, all new and different things can be, but it will get easier with time unless the relationships are not salvageable for whatever reason.
If this approach is not getting you anywhere and if everyone appreciates you except for the decision-makers, leave the environment because it’s not for you.
Making that effort is not for naught. It helps you stretch muscles that you hadn’t used before, it ensures that your last few months are spent learning rather than fighting, and it prepares you for your new environment in a positive way.
Good opportunities come when you are ready for them not when you are whining about your current situation.