I don't think gender matters
We all hurt and grief in different ways. A lot of times when people hop into relationships soon after break ups, it's because they are trying to mask the pain and feel that a new and improved version of their previous situation is what they need.
Could take weeks, months, or years depending on the person. But it's up to that person to decide how long they are going to let it affect them as well as future relationships which is why self reflection is so important during the midst of a breakup.
Me personally, I've just tried to occupy my time with other activities, mainly ones that force this self reflection and just try to improve in veering a better person overall.
There was a period when one of my gfs broke up with me over some dumb shit and I was playing BG's "bat a bitch" and "stay in line hoe" on repeat, but that just made me even more upset.