Is it necessary to serve the notice period of company is mentally harassing you?

I resigned my job on the same day without giving notice period. Company accepted the resignation letter. In that they just mention if you want your current salary then you to serve for 6 months which was training period but they already deducted my last month salary. Now they are telling me to serve 2 months more as a notice period or I have to pay entire training period expenses incur by Company on me as per rules from offer letter. When they gave me offer letter I wasn't ready to signed it I asked them so many times for discussion but they said whatever we had communicated while joining those will be the only rules, this offer is just for formality and in that communication they told me your training period will be for 3 months only. They are just threating me as you singed on offer letter you have to follow the each rule. They are showing me the rules and mentally harassing me. I was ready to join again but neither i wish to join as the words they are using in mail was not proper nor I can pay the expenses to company. They are just mentally harassing me by saying will take action against you for my indisciplinary behavior towards comapny. Is there any law from my side.? What should I do?