School and university are particularly rough times in life, in my experience. It can be easy to feel that your worth as a human being is boiled down to a number, that your grades define you and your success at being a person.
Speaking personally, when I was at university, good grades were just as awful as bad ones, if not worse than them. I get a bad grade, I take that as a failure of the self. I wasn't good enough. But good grades worked more insidiously. Because if I got a perfect GPA one semester, then I know that my overall GPA can only go down after that. Unless I maintained a perfect GPA throughout the whole degree, it could never be good enough. And then, even after that degree, there was postgraduate study …
University is rough in that you don't have a 9 to 5 timeslot in which you do things and are then done. A lot of jobs in life work like that: you turn up, you do what you need to do in the time you are given, you clock out, and you go home and you're done. Certainly you'll likely fret over things you did wrong while on the job, or stress about the day to come, but ultimately, the job itself defines what you can put into it. Of course, there are jobs that aren't like that. I was a teacher once. I didn't work from 9 to 3 each day, contrary to what many people believe. I never stopped working. Doctors face a similar problem.
With university, my recommendations are these, for my past self, and hopefully for you:
1. Recognize that you are not a number. Your grades do not define your value as a person. They don't even define your knowledge of whatever was being tested. They are a representation of a snapshot, of two or so hours in an exam hall under extreme stress. You are more than that.
2. Learn your limit. Know when to accept that something is good enough. Know when to close the laptop and go outside, or listen to music, or see a friend. It's very possible to spend every waking hour of your 4 or more years at university obsessing over making every piece of assessment worth it. It will only end in sadness.
I can speak from personal experience. I dedicated everything I had, every moment of every day, to my studies. I am now a deeply broken person. Please, learn to care for yourself.
The fact that you want to care for your family: this is a sign that you are a good person. The fact that you went into pharmacy, a field for helping the ill: this is a sign that you are a good person. Don't let yourself get in your own way.
In hindsight, I'd estimate that if I'd spent, say, 60% of my waking hours studying and the rest 'living', I probably would have been able to finish post-grad. As it was, there was no balance, and there was no hope for someone who put in everything into study. Diminishing returns, and all that.
Sorry for the ramble. I just hope you can find a path to happiness for yourself.