This is a very difficult and subjective question to answer but I hope I can at least point you in a direction to aid in your decision. I am working on a PhD in the biological sciences so I am answering from that perspective. What you are experiencing can be lumped into about three different categories:
Normal/moderately normal for a PhD student
- worried they're not smart enough
- stressed and unhappy
- homesick
- feeling lonely
It is relatively normal for PhD students in the biological science to feel these things to varying degrees of severity on and off throughout your 5-6 years in the field. You have a lot of pressure between classes, teaching, and research which can occupy a lot of your time and perhaps all of your evenings and weekends. Much of the work may require you to be alone or with little company. You will be isolated from your social life due to the pressures and demands of research. You may be in a new country or a new city.
I would suggest finding one or two things you truly enjoy and carving out the time to do these activities once a week. You may find yourself more efficient because you will be working under less stress. If you have a niche interest, look online for meetups with others. It will be much easier to make friends when you already have major things in common.
Normal for many jobs
- disagreements with advisor
- worried about a family situation (e.g., a sick relative)
- worried about money
- homesick
- worried they're not smart enough
If you are not in your PhD program, these items will not necessarily just go away. Struggling with a boss or having disagreements with management can happen anytime groups of people have to work together. Monetary issues or family situations will not be guaranteed to go away just because you are working elsewhere. Worry over not being smart enough can still happen in any job where you will find yourself compared to the work of co-workers.
I significantly downgraded my lifestyle when I began my PhD. You may have to find alternative ways to save money and not live as extravagantly.
Remember, in many ways your PhD is an investment. This will not be forever.
Of potential medical concern
- suffering from a mental health issue
- worried they're not smart enough
- stressed and unhappy
- haven't made any friends, feeling lonely
You have to determine for yourself or through a doctor if the severity of what you feel is just due to the normal stress of graduate school or actually indicative of an underlying medical condition. While it is normal to feel stressed and lonely at times, persistent feelings may warrant medical intervention. There are counseling and medical services on many campus so I urge you to consider their opinion and suggestions before quitting your PhD.
Conclusion
Life will always be full of stress. You will face challenges in your career if not in graduate school. You will deal with financial stress, medical stress, deaths, and loneliness at various points in your life with or without your PhD program. What you need to determine is if the severity of these feelings is normal and something you have to learn to deal with or if it is the result of medical health problems.
For me it was the former. And the experience I have had in my program, pushing through the stress and loneliness and coming out on top, has, more than anything else, made me feel like I have truly grown up. I hope this is also the case for you.