Mental illness can be very difficult to navigate when going through your undergrad career. As someone with bipolar II, anxiety, and boughts of treatment resistant depression, with a Bachelor's degree, I have full confidence that you can achieve your goal. No, it may not be easy, but it's certainly more than possible. The important thing is having the right methods to managing your mental health so that you can combat or mitigate the symptoms.
Take care of yourself! One of the most important parts of managing mental illness is getting sufficient sleep. We all know sleep can be harder to come by when in school, but I cannot stress enough how crucial it is that you stay well rested, as being tired can exacerbate your symptoms. Additionally, do things you enjoy in between classes. If you enjoy being outside, get some fresh air and do some meditations. If you enjoy working out, I cannot recommend it enough as it radically impacts your mental health. Essentially, do things that make you happy and keep you grounded in the midst of the stress.
Therapy can be very important. Especially with how busy school is, it can be very helpful to have an hour or so to look forward to on a consistent basis that allows you to talk through your struggles and develop coping strategies. Some universities even offer counseling onsite, as mental health continues to become a greater focus.
Again, it won't necessarily be easy, but I know that it's definitely possible, and I highly encourage you to not give up. Stay focused on the reason you're pursuing your degree and less on the obstacles. Keep yourself healthy, rested, and do things for yourself, and you can achieve this goal! I believe in you!