Stop putting in any effort with either of them, if you see them in passing then of course acknowledge them, and if they speak to you first then answer them like you would any of your friends but do not put in any effort - basically don't seek them and don't 'actively' ignore them, and try not to think about them - think about your work instead!
If you want the married one then ignoring her is certainly a good start as, like most girls, she is more interested when she thinks the man is not interested in her - as you have seen for yourself. But don't think that ignoring her is a way to make her interested again, do not expect this or you will not be ignoring her.
Although to be honest it sounds like your bridges are burned with both of them so the best thing to do is to try and forget you ever had emotions about them, it is possible in time (a few months max). There are no magic bullets for this - apart form finding another girl (preferably outside work!).
Good luck fella.