Talk to your doctor
Many things can make you feel tired, cause headaches, and "messing things up"-- maybe a problem with concentration.
You will need an exam and lab to rule out treatable medical causes. One thing that comes to mind for all of these things is possible anxiety
. I would recommend establishing a relationship with a doctor to help you work through the best way to deal with what is wrong.