K. Bhagyaraj resigns