I have good news for you. This is within your control, and you can stop worrying if motivated to do so. When you start to dwell on sad things, catch yourself immediately and do self-talk. Say something like: “Worrying is an absolute waste of time. It has no power. I need to study/take a jog/call a friend/clean the house (or whatever it is that you're putting off).” Then, get going and stay productive!
When you have an annoying behavior that's taking over your life, you need to ask: “What is its benefit to me?” At first, you may think it has no value at all; that it's only pain and a detriment. Most people, though, use worrying as a way to stay safe, avoid risks, and avert taking action. After all, it's much easier to worry about someone else than to get into gear and build our own lives and take care of our own problems. Worrying can give us a false sense that we have a little bit of power over a situation in which we actually have none.
In addition to self-talk, another technique to stop worrying is to allot yourself five minutes of it each day. Set a timer in the morning and worry to your heart's content until it rings. Then, when you're done, you're not allowed to worry again until the next day.
Your life and your time is so incredibly precious so please stop wasting it on worrying and sad thoughts. Wayne Dyer, the spiritual author, and speaker, said: “As you think, so shall you be.” If these suggestions don't do the trick, make an appointment with a therapist. You may need a professional to delve deeper into why you're holding on to worrying as a coping device.