I am currently a junior studying electrical engineering, with a 3.2 cGPA, and planning on doing pre-med on the post-bacc track. I have been forced to take medical withdrawal three times. I also have been out of school for an entire year (this year) receiving treatment. I spent seven weeks in the hospital this year, including four days in the ICU.
I have a rare autoimmune disease, basically an autoimmune autonomic neuropathy (more specifically, ganglionopathy) which is also known as autoimmune dysautonomia. My disease causes severe gastroparesis (chronic nausea and vomiting), orthostatic hypotension (low blood pressure/high pulse rate in the standing/upright position) and severe fatigue.
I also have type 1 diabetes (autoimmune diabetes), which was previously believed to be causing the problems listed above, before I was diagnosed with my rare autoimmune disease. In other words, it was previously believed that my problems were due to diabetes complications.
Anyways, I don't want to make you feel worse, but academically this has been a nightmare for me. Every semester is stressful and I usually feel like I am on the shadow of the valley of death every single semester, but generally I end up doing fine. Also, any semester where I was forced to take medical withdrawal, I feel like the world is collapsing on me. No matter what, I am going to get my degree and I try to focus on the big picture, rather than my deficiencies.
If I were you, I would do everything in my power to get a diagnosis so you can figure out how to handle the situation in the future.
From an academic standpoint, I would also recommend registering at your university's disability services office, with accommodations such as extensions of due dates, exceptions to absentee policies, and extended testing time (makes exams less stressful).
For medical school apps, you will have plenty of opportunities to explain your situation in AMCAS. In my situation, due to taking medical withdrawal three times, I can expect to be asked 100000000x "are you sure you can handle the rigors of medical school?" and "what have you done to make sure you can handle x, y, and z rigors?"
I would imagine your situation would be similar when you apply to medical school.
Unfortunately, being chronically ill and going to university is difficult. You will have to make sacrifices and compromises, perhaps resting more, doing fewer ECs, and maybe even taking a lighter course load.
But, I urge you to get a proper diagnosis as soon as possible. This will allow you to get proper medical care, including coordination of care. You need to have resources (plans with your doctors) in case problems turn in to a crisis/alter your functioning to where your grades are being impacted, so that another treatment or tool is available at all times. Try to keep variables in check such as getting plenty of rest, fluids, pain management, to keep things from hitting the fan.
When you get a diagnosis, things will get better. Keep up the good work, and do not feel bad about getting marks that undermine your potential. It is not your fault, and you are doing a great job, even though it is very difficult. Do not let anyone tell your differently