We all have times of facing and going through negative situations. If we take those situations and incidents and begin to bless them, affirm that something positive, good, happy, beneficial and/or great will come about from them, we change their energy and affect on us.
Open up to the thought and feeling that when you change a job, that a better one is coming along, and a relationship that comes to an end, opens a door to a better one. During periods of transition, starve your attention and personal power of any negative responses or thoughts.
Whatever you put your attention on is a directive to the subconscious to manifest more of it. Trying to figure out how it could happen is only a trap, and that's the work of your inner mind. Trying to plan what the benefits will be is also the job of your subconscious.
Know that there was a reason for the experience. Perhaps you outgrew that job, but were unwilling to let it go. Every "negative" state is made by the same worldwide energy that "positive" situations are formed from. Learn to use your creative mind, a power house within you, to work and uncover what benefits can come from circumstances. Bless the situation and affirm to yourself that something good is going to take place.