You didn't say what type of medication - but I assume it is one of the many types of anti-depressants. There are many on the market, and some work and some do not work - depends on the person.
In either case, please give the med as much as 8 to 10-weeks to work for you. That too varied per person, but it can tak that long.
If a primary doctor prescribed this med, he's probably shooting in the dark .... he wasn't trained to analyze depression. If it was a psychologist, they are heavily trained in determining depression source and meds.
Consider one other thing too ...... no med will cure your difficulties with the feeling of isolation. You do need someone or a professional to talk to. Again, thepsychologist is trained in what you migh call talk therapy. It often is very successful.
I have used a PHD in psychology years ago to help me thru several dark things going on in my life at the time - including a family death and some vengefull things after a divorce.
Please consider seeing a professional - and give the meds time.
Peace and wellness
Rob & Gizmo