It's easy to feel unhappy in a job when your boss doesn't trust you or has another reason for trying to do your job. Look for the right actions and words to use so you can change this pattern with the boss. Sometimes, this kind of situation becomes so untenable that people end up leaving their jobs or at least seek work under a different boss.
The first thing is to take control of how you view the situation with your boss. Because life isn't always fair, don't waste time nursing a grudge or feeling like a victim. Do spend time asking yourself how your own actions might have contributed to this problem. Make an action plan to change the situation only after understanding your side of the problem.
Avoiding Escape and Revenge
Focus on maintaining your mental toughness and emotional balance in this situation. You aren't going to run away from change. Choose to view change as necessary for growth. You don't want to give into any strong urge to quit your job or complain about your boss to her boss. Be a professional and try to fix this situation yourself.
Communicating with Your Boss
In any situation where you don't like how your boss is treating you, there is the obvious need to have a conversation with him and discuss what bothers you. When specifically addressing a problem such as your boss taking credit for your work, you could give his boss face-to-face updates or copy her on emails of what you've been doing on important projects.
Whether you ultimately tell your boss your boundaries or not, you have to create personal boundaries. There is only so far you should allow any boss to push you by taking over your job or otherwise being abusive. Quitting could be the ultimate option, but you don't have to start there. Sometimes, when you push back at a pushy boss, you earn some respect for standing up for yourself. Other times, standing up for yourself makes you more of a target. Don't assume how your boss will respond to any kind of honest communication or boundary setting even if you have brought up the subject before without success.