Former mayor to contest state election