There is a process to cancel visas and collect ESB; follow the policy. Ask your HR, it is fine to delegate the authoity to your most trusted colleague or friends to amicably/mutually break the employment contract. They might deduct the notice period salary from ESB amount.