It simply is a by-election, so the entire riding votes to fill that one seat. That's what happens at general elections for the national parliament. We also fill seats for the European Parliament, and there it's done a bit differently. There at election times each candidate has a list of substitutes, and if they resign or die, their substitute takes over the seat.
There's probably no perfect way of doing this under PR-STV.