I can't see any reason why a new girlfriend should have to listen to her man cry and complain about his ex. There's absolutely nothing romantic about him sharing his pain from his broken heart. That's a process he needs to go through alone, or with friends who don't have an emotional involvement.
I suggest you tell him you're sorry he's hurting, and that you hope he'll get in touch somectime in the future when he feels he has healed. 'If the time is right for both of us, maybe then we can see how things work out.' Then I think you should walk away and be open to getting to know other guys.
By the time he feels he has healed, you might have another boyfriend and no longer be interested in this guy. Or perhaps you'll be happy to go out with him. But it would be best with a fresh start. You don't want a guy who gets in the habit of crying on your shoulder about another girl. No, that's not a good place to start. Are you always supposed to feel sorry for him, and worry that you might be doing something that reminds him of his ex?
Leave the guy to get over his pain. You don't have to live through his grieving process.