The key is to keep this simple truth in mind: it's a job. You do it to survive.
Don't let your sense of self-worth and your identity get tied up in your view of your career. Your job does not define who you are, you do it because someone is paying you to do it for them.
There is satisfaction in doing the work well; and it is nice if the work fits with your personal tastes, but if you refuse to let it define you, you will be the happier for it.
And as a definite plus, it will strengthen your negotiation position. If it is just a job, it's easier to walk away if the compensation does not suit you.