How do you regain your motivation?

Try to get more exercise--a walk every day will do, eat well, get the right amount of sleep, cut out sodas and sweets and be sure to spend time with a good friend or have a nice talk with a parent or friend every day. Step away from the computer/phone/TV. In general, most of us periodically go through these times and if you can keep the important things going in the meantime, it passes. If this lasts more than a month or so, see if you can visit your doctor to be sure that all is good with your health and that you are not depressed.