Welcome to healthcaremagic forum
Self abuse/ masturbation
does not affect one physically and mentally, unless one is so obsessed that he/she stops doing anything else besides this. But yes anything in excess is bad. Regarding academic performance - the only thing that can be said is, if you study you pass, if you waste time in other things , you know whats going to happen. Waste of time is the only harm , SELF ABUSE HABIT has done to you.
Distraction from sex related things and a conscious effort to put your energy to something productive like studies will help.