First, communicate. Rather than making an assumption over how someone feels, I would ask.
If he is in fact losing interest in me, I would adjust the relationship to something that better reflects what we currently are.
I would work at accepting. A lot of the suffering I put myself through comes from wanting, pushing, forcing, wishing things were different from what they are. (Reality always wins.)
I would give myself time. This is loss, and as such I will grieve.
I would remind myself every day that someone losing interest in me is a reflection on his feelings, not on my worth.
I would give myself all the things he could not give me: I would double down on my own pursuits with renewed interest, do things I never got around to doing, try a lot of new things and show me every day that even if he is no longer interested in me, I am interested in me.