Depression meds question (trigger warning)

So depression definitely runs in my family and due to trauma and stuff I'm not going to get into I'm considering confronting a Dr regarding depression/mental health things which I've never done before and I'm very stressed about mainly because I don't really have a support system. I have severe anxiety for sure and honestly it cripples me to the point where I can't even step out my front door and when I feel too down to go anywhere even with my husband I will just curl up in a ball and cry for hours... I have zero motivation and this is a trigger so I'm sorry but I do think of self harm from time to time and have irrational fears which have gotten out of control. I guess to sum it up I just want to know how to address this to a doctor? I go through GoodRx which is online but I don't know if it's smart to ask about something like that like maybe anxiety or depression or whatever it may be especially if they have to run tests or do anything like that would it be best to go in person or can I do it online? My husband got some pretty generic anxiety medication online and talked to a doctor for like 5 seconds and got some but I personally don't know how to feel about that considering the extent of what I'm going through mentally... I don't know though I'm not very educated on this and haven't been to a doctor or anything in years so I don't know what would be best or how to address this to a doctor so if anyone has any advice I would very much appreciate it. Thank you