I feel sad that you are going through this. It sounds like ADHD and these days there are apps that help with coping mechanisms. AT this point, I must tell you that so many great people have ADHD. it juts means that the brain works in a different way to the people who set exams, write text books. What you need are coping tactics. Here are some apps that you might like to explore:
Best overall: SimpleMind Pro – Mind Mapping
Best for setting reminders: Due – Reminders & Timers
Best for taking and organizing notes: Evernote
Best for reducing overwhelm: Remember the Milk
Best for collaboration: Asana
Best for managing your to-do lists: Todoist
Best for Pomodoro: Brain Focus
Best for project tracking: Trello
Best for simplicity: Clear Todos
Best for security: Bear
Best for productivity: Productive – Habit Tracker
Other things to do:
make sure that you have download time where you just sit and do nothing and try to empty your brain ( gradually reduce this time over months)
expose your brain to calm music/sounds. The frequency of 432 Hz is associated with calming the neuronal firinghttps://www.youtube.com/watch?v=TxHctJZflh8&t=39s
Try not to listen to loud, riotous music for a few weeks
Make lists and cross off items that you have accomplished e.g. took plates to the kitchen
sleep may be a problem, but try being in bed for 9.30 even if you find it hard to sleep. Just say to yourself. 'I might not sleep but I'll leave that to my brain to decide!'
Learn to breathe slowly, in through your nose and out through your mouth slowly for a few minutes, especially when you feel panicky.
Connected with the previous point, meditate, pray have some way of reaching to the Higher Power ( Allah, God, Yahweh, Jehovah)
Take things slowly and don't be impatient with yourself
Speak to the University counsellor about the issue
Most of all don't be hard on yourself and look for a process that might take time but is longer lasting!
I'll be praying for you!!!