I am sorry to hear of your situation, but I strongly suggest you don’t take any action without talking to a counselor first. http://duels.ucsb.edu/advising/appointments is a starting point.
See also the info on the page https://registrar.sa.ucsb.edu/registration-enrollment/registration-enrollment/withdraw-from-the-university
A key thing to remember is that if you do not leave in good academic standing then you have special rules that will apply if you want to subsequently enroll at any UC campus.
You need to do what is best for you and your health, but this isn’t the time to get your advising from the internet IMHO. Find the people at UCSB who can help you with whatever you decide to do. People who work at colleges generally are very supportive of the students and I think you’ll be pleasantly surprised at the help you can receive.