Hello Mr. Verma
As you explained in detail, I can make out that you had been in a troubling job till now and that has led to a lot of difficulties, still you managed to compete 7-8 years duration in your job.
You have taken a major decision and left the job which appears appropriate as it had been the reason for your problems.
As I can predict after quitting the job, most of the symptoms would go away on their own in some time. If they persist for more than 15 days and are troublesome, you should consult a psychiatrist and take appropriate medicines for short term.
In the long run, however, I would suggest that to face the upcoming difficulties in life, whether professional or personal, you need to take suggested therapies for coping skills improvement.
Next Steps
You should consult a psychiatrist for your mood swings and disturbed sleep pattern.
Health Tips
as you have quit the job, do not sit idle, exercise daily, have healthy diet and keep yourself busy for fast recovery.