it's very situational. in most cases where, I would say it depends on whether or not the guy/girl wants to get back together. but I can definitely see situations where sex can temporarily suspend bad thoughts and reinforce more positive attitudes toward a relationship. it's tricky, which is why most people advise against it.
I did it, and it didn't help a damn thing. it didn't end up hurting me, like most people said it would, but I wouldn't put any hope in it fixing or being advantageous if you're the only one wanting to get back together.