Don’t. It’s just that simple.
Sure, you can be the best person you possibly can, shower them with love, remind them how much you care about them – through actions and words – be supportive, understanding, caring, fun. These things, I advise you do throughout your entire life in every relationship. But sometimes none of that matters. You can find flaw in any relationship, no matter how much love is there, no matter whether it’s something both of you consider a flaw or not. At the end of the day, if someone decides they no longer want to be with you there’s nothing you can do to change their mind.
You can hope, wish, question, demand an explanation, close your eyes like when you were a child and try to pretend it isn’t happening, but we’re not children anymore. You can’t stop someone from doing what they want. You shouldn’t try to. Do you really want to be with someone if you’ve had to talk them into staying with you? If you’re constantly wondering whether you are what they really want? That will drive you crazy.
The best thing to do is simply remember that life goes on. Even if things end well before you’re ready for them too, remember that you were happy before this. You’ll be happy after it, too. And take solace in the fact that maybe, if their decision is to no longer be with you, they don’t deserve you in the first place. Just as there are always flaws in relationships, there are always positives in every situation – sometimes you just need to look a little harder.