Asalaamu alaykum,
Thank you for sending this important question to Ask About Islam.
This is actually a very common question for University and High School students, so we’re glad to answer it.
The short answer is: re-prioritize your life.
The good news if that you still feel guilty for it, which is a sign that your faith is still alive. Things are more serious when you don’t feel badly.
Regarding missing prayers in general, there is literally never an excuse to miss a prayer so long as one is alive, conscious, and able to move even one of their fingers to mimic the movement one would make with their body when one is so ill, one cannot even try to bend at the waist or is stuck in bed, or near-death.
Prophet Muhammad, for example, even prayed during war. During actual, active warfare, wherein his life and the lives of his companions were in danger:
When you (O Messenger Muhammad) are among them, and lead them in As‑Salaah (the prayer), let one party of them stand up [in Salaah (prayer)] with you taking their arms with them; when they finish their prostrations, let them take their positions in the rear and let the other party come up which have not yet prayed, and let them pray with you taking all the precautions and bearing arms. Those who disbelieve wish, if you were negligent of your arms and your baggage, to attack you in a single rush, but there is no sin on you if you put away your arms because of the inconvenience of rain or because you are ill, but take every precaution for yourselves. Verily, Allaah has prepared a humiliating torment for the disbelievers. [al-Nisa’ 4:102]
When one thinks of it that way, our excuses about work, school, and such are pretty miserable excuses to miss prayer.
That being said, we are all human and sometimes we find ourselves unable to pray without causing repercussions in our lives or in the lives of others.
You mentioned you are missing prayers because the athan comes during the class time.
Are you aware that you do not have to pray the prayer as soon as the athan is said? You have until just before the athan of Asr, for example, to pray the Dhuhr prayer.
We should not delay our prayers, but later is better than never.
Are you saying you have such a full schedule of back-to-back classes, without even 10 minutes between, for around 4 straight hours, that you cannot pray Dhuhr?
If that is the case, how do you use the restroom? Surely, if you needed to use the restroom or get a drink of water, your professor would permit you to leave the class or lecture hall for those few moments.
We must look at praying our prayers as something just as pressing and more of an emergency than meeting our bodily needs.
You mentioned you live in Sweden. I am not familiar with the laws there, but I know that there may be a legitimate reason you are uncomfortable with praying in public.
I highly suggest going to someone of higher authority in your university and requesting a quiet, safe space to pray daily. Praying is a basic human right, and I feel sure someone will be able to find an office or empty room not being used. Some administrator or professor may even volunteer to let you use their office to pray in.
The final point, really, is that prayer is the oxygen of your soul. You cannot deprive your soul of its connection with Allah and expect there won’t be any consequences and repercussions in your life.
Everything costs something. Everything has an opportunity cost. The opportunity cost of your future career should not be the detriment of your eternal soul.
Please have a look at these articles on the important of not missing prayers, and what to do when work or school make praying difficult or seemingly impossible: