There are two ways of looking at the matter. First, if it were the employer who paid you an indemnity so that you could leave the company earlier, then I think the period should be treated as a period of service for the calculation of gratuity purposes. Now, in your case, it is you who wanted to cut short the period of notice by paying an indemnity, I think this short notice period should not be considered as a period of service for the purpose.
Get another opinion from the Labour Office or the Industrial Relations Department. There is no provision in the Employment Act for payment of gratuity.
KL Siew has put up a sister site by the name of mylabourlaw.net, which is in effect a more user-friendly version of the present popular pesaraonline.net. The site is in the process of being fine-tuned but it is fully functional. You are invited to visit the website at http://www.mylabourlaw.net and give your views or suggestions. Queries can be posted and be responded from there as usual.