How do you stay motivated when after 13yrs. Of marriage you wife says she no longer loves you.
I suppose it kinda depends on why she said that. Is it because of something you did or didn't do? Is there something she needs that you haven't given her? If so, is it too late to fix it? Is she worth fighting and changing for? There's your motivation.
Do you have kids? There's your motivation.
Or is it out of your control? If she has some personal issues or family/other outside pressures, or if she's not willing to work things out, then there's nothing you can do but let her go. Then, you need to become your own motivation.
Take some time to wallow, that's healthy. Then focus on bettering yourself for your own sake. don't lose weight/bulk up to impress the ladies, do it to be healthy and take care of your own body. Don't learn a new skill to win your wife back, do it for your own pleasure and fulfillment. Go to therapy - if not as a couple, then on your own - not only to cope with your grief, but to strengthen your mind, build self-esteem, and learn skills to help you survive this and future crises.
I'm really sorry you're going through this. I lost my partner about six months ago. We were only together for not even two years. But I loved her more than I can describe. I still do. I really thought we would be together forever. But very few relationships last forever, not even most marriages. People go through breakups and divorces every day, and it sucks, but they survive and so will you.