Masturbating guided by desire is not detrimental but if you mix it with watching porn and masturbate compulsively then it can cause many problems. Mental power and concentration can be affected if you are anxious as well.
Next Steps
Please see a counselling psychologist for detailed assessment. see a physician for any other health complaints leading to mental tiredness.
Health Tips
Reduce or remove other distractions. Masturbating 3 times a week if guided by desire is OK. Deep breathing exercises help in concentration over a period of time.