A good synonym for "painting oneself into a corner" is
leaving yourself no other option
When a person is painting the floor of a room, for example, and he literally paints himself into a corner (with nothing but two walls and a ceiling by which to escape), chances are he will be forced to step on wet paint to extricate himself, thus ruining his work.
Your use of the phrase metaphorically is quite apt. By insisting on a pay raise "or else" (I supply the "or else"), you have no other viable option than to quit and look for employment elsewhere if you're not given the raise.
In a different context (say, in a courtroom) a lawyer should never ask a witness a question to which she does not know the answer. If she doesn't, she might just be painting herself into a corner by eliciting unanticipated and damaging-to-her-case information from the witness. In so doing she could very well leave herself no other option but to concede the case. In other words, she'll be forced to live with the damage she's caused through her lack of planning and foresight.