Defamtion at workplace

I was working in software company in Chennai as a senior professional from Oct 2014 to Feb 2016. In the year end appraisal meeting, my manager wantonly made some remarks on my mental health condition. He said that "i had mental depression problem so that i needed to consult with some Psychiatrist If not my career would be in danger". He asked me to to quit my job as company would be going to lay-off the non performers and other who had some personal issues.I shocked to hear his rude words but asked him politely how did he know that i had mental issues. He told me that he was good in reading others mental conditions by watching others closely. Since he is very close to our VP and Head VP, i did not react at the meeting and met VP the next day and complained the same. But my VP asked me to take it easy as it was not a serious issue.He too asked me to quit my job as company was going to lay off the non-performing employees with out any proper notice period.I shocked and humiliated i resigned my job that day itself. But tried to contact HR in person. but she was on leave for few weeks. After some days i sent the mail to her with the details. But there was no action from HR. I did not escalate the issue to top level as i afraid of my salary and PF settlements and obtaining experience certificate might be in danger.Later, i got the certificate and last month salary. But still PF closure is not yet done as company is not handling my case properly.Now i want to take legal action and demand proper compensation from the the company. Please kindly suggest how to proceed in this regard.