I'm not sure if pharmaceuticals are a permanent solution to what you are experiencing (they might be). Like the first person that responded said, it's okay not to be okay. It's okay to break down sometimes, try to give yourself some space to feel/acknowledge what you are going through without the pressure of having to be okay or maintaining some sort of image. Talking to a professional is important if you are feeling too overwhelmed at the moment and if they prescribe a medication that could help you stay above water for the time being.
I think a more permanent solution is more about finding a point of view on life that works for you, that helps you make sense of the world around you and what is happening in your life. That is more difficult to do and there is no instant solution, but I feel like it is more gratifying and long term. It is done through experience, through searching, through sharing/learning with people around you, through living. Turning to religion might even be a good idea during these times. Even if you do not believe in all the mystical aspects, I believe that at their core, religions offer a frame of reference (point of view) that helps you make sense of the world and can help you make decisions that can improve your life (most religions will not lead you to destruction). They can also help answer a lot of questions that you may have about why you are here, why things are the way they are, what is the meaning of being alive, etc. If you are wondering which one is the best for you, try leaning into what has been practiced in your family since a lot of the moral bases or ideas that were passed on to you come from there. FOR ME, that was Catholicism, and although it has not solved all my problems I can say that I wish I had leaned into it much earlier, it has offered answers to many of my questions that make sense to me. I also like the sense of community that it offers me, I participate in a prayer circle in my church and that has been very fun and eye opening for me... Catholics believe that depression/ mental health is more of a spiritual affliction, I think there might be something to that. Just a thought...