If you are feeling low and losing interest in your daily activities, your sleep, diet and work is disturbed for more than 2 weeks, you might be suffering from clinical depression.
Masturbation in itself is not a harmful habit in anyway. But excessive browsing on the net, or excessive masturbation maybe a sign of underlying depression.
Next Steps
Visit a counselor, share your problem, you will b taught mental exercises to cope with ur problems.
Health Tips
Try talking to a friend and family member. If you have a specific set of problems which can be solved take help from people and try to solve them one at a time.