Unfortunately, this problem is very common. But there is a solution.
He Won't Leave His Wife
You already stated that he felt bad for cheating on his wife, but if he really was sorry - he wouldn't want to do it again. That's a sign that he isn't planning on leaving his wife. And why would he? He has children with this woman - and if he can have you now, why leave her?
The truth is, men usually never leave their wives. Especially for a "work fling". He never indicated that he was having problems with her, nor did he say he was going to leave her. So you have to face the truth - he will never be yours.
Get A New Job
The first thing you have to do is - GET A NEW JOB. Working with him is not going to help the situation. And by responding to his flirtatious ways - you are sending him the signal that you are okay with your "relationship".
You can't help who you fall for. Unfortunately, it isn't someone you can have. At least now you can move on with your life. You had the experience of falling for someone - now you learn from it. Love will eventually find you. And you are still young that you will find many chances at it.
Hope I've Helped,