I would recommend go with what makes you happy, but try to plan it out as much as possible. Some would say stick it out for the job security, but in some cases these days there is no such thing as job security especially if you are working under a big company. Many companies these days are often looking for ways to cut expenses and sometimes outsource so they won't have to worry about employee insurance and what not. Meaning in some case your company can cut you for good to no reason.
Also I feel that if you are unhappy at a job, it will eventually lead to health issues such as depression and other medical problems that essentially effect your performance. And since some employers will see it as slacking instead of you actually being ill from depression and other medical deterioration (because they are horrible at being managers), they may assume you are no longer a good match for them and cut you loose (sometimes ignoring the warning signs of it being their poor working conditions that lead to it). I essentially believe that a person's job position is dependent on both the employee himself and the employer's management ability. If one or both of those have a weak spot, it will come to the a head and can lead to loss of employment. So if you are sad and depressed at your job, I believe it will eventually show and become obvious in your performance.
I think its best to leave when you feel you can't bare it anymore. Its better than trying to break your back to maintain the job and feeling used a the end after enduring a lot of sadness to keep it and still get cut lose.
So I recommend take this new opportunity even if its temporary. It's still money that you can save and prepare for a new job change. I am not sure about how it may look on your resume; but if you ultimately plan to become self employed it may not matter. Just don't let the job affect your health and please remember depression and anxiety IS MEDICAL! No job is worth your health and sanity because if you are sick are no value to the job any and you struggle that much to generate income.
*but to each is own. Be as smart and tactful about the decision as possible.