The one consolation over this is that I do think when the kids are older they will look back and remember who was the stable parent always there for them.
Oh, they absolutely, positively, without a doubt, will. This is exactly what happened to my sister and her kids when she and her X split.
You just keep on being a great mom, loving, supportive and CONSISTENT.
Don't give up on the job yet. Even if it doesn't turn out to be what you want (with the hours and pay) at least it's something current on the resume.