I can imagine how difficult it is to function when this is happening. It seems like you may be under a significant amount of stress. Of course that's just my personal opinion but when I've hit a block like that I've found it useful to reframe the task at hand and take some time to relax. All of the above could be achieved through cognitive behaviour therapy approaches or self guided help. There's resources available online from sources such as the NHS. Other than that resources such as academic support or a discussion with you GP could help also. Just to make sure it's not a physical problem or a symptom of a mental health conditions. Time some time to breathe, think reframe and seek help or advice as needed. Stay happy and healthy and hope this gets resolved.