Whairdhugo,
You must be one of the rare person to hand in your resignation with a negative leave balance ;-)
In answer to your question, I would imagine that its calculated at the same rate as cashing leave in
i.e.: basic monthly salary x 12 divided by 365 equals your daily rate x amount of days you owe them?
STD, your dependants visa are linked to your visa, if your visa is cancelled so is theirs, they would have to stay on a visit visa and do a visa run every so often...