As far as I know there is no method by which an entire general election can be delayed once it has been called (i.e. once th old parliament has been dissolved and the new writ issued). But if a candidate in an individual constituency dies between nomination and election day, then the whole elction in that constituency is delayed by a few weeks so that new candidate(s) can be nominated. If a main party leader were to die, then the party would simply have to choose a new leader quickly. For example, if Tony Blair were to die in the middle of 5th May and Labour won the election, The Queen would have the duty of using her royal prerogative to choose a suitable alternative person as prime minister. She would probably askk for advice from the other party leaders and from former prime ministers. If she chose Gordon Brown, then he would probably be elected later as Labour party leader. If the party chose a different person as their new leader, then the PM chosen by the queen would resign and the new leader would be appointed as PM.