I had a friend (female) who swore by 6 months. But I think most of us will tell you there's no hard and fast rule.
I agree with MrWilly that emotion is a key element, and resentment isn't the only emotion that can screw up a relationship. Loneliness or feelings of low self-esteem can drive someone "on the rebound" to latch onto the wrong person. Waiting until you feel good again is great advice.