I think it has to be person of same party. I can't see the King appointing a Tory PM after the death of a Labor PM, just because a higher % of labor died than tories in the attack.
One would instinctively say not, but there's no legal barrier to it. Wouldn't even have to be a member of Parliament, actually. In the absence of an obvious leadership figure from the same side, a "non-political" figure acceptable to all sides would probably be first choice. And given the nature of the scenario, I wouldn't be at all surprised if an all-party (or man-three-parties) coalition was formed.
And why not call fast elections? The surviving members are almost guaranteed an reelection and fresh 6 year clock on power since they will have sympathy, and presumably if they have credible challengers, these challengers will run for open office.
5 year clock. One reason is that, if a lot of MPs have died, there won't be any candidates; it will take time for parties to organise local selections for replacement candidates etc. But more importantly, the scenario implies a great deal of chaos that would be massively compounded by an election (more below).
And by doing snap elections, the new King takes a lot of pressure off the members.
Well, no - election campaigns are high-pressure periods. If the new PM is the leader of a party (or quickly made such by his party) you are immediately splitting his focus and you'll be constantly calling him and other ministers back from the campaign trail to go to COBRA meetings etc.
Furthermore, by tradition (certain to be observed) the government goes into a sort of reserve mode during elections - the "purdah". During this period, ministers are supposed to postpone the initiation of any new action that a different government might not want to follow through on. That could mean delaying a lot of ostensibly necessary measures. Civil servants, meanwhile, are supposed to take special care that nothing they or their department says or does could be construed as taking the side of one party or another, or in any way influence the outcome of the election. The last thing you want in the first weeks and months after such an attack, when you as a government are formulating and conducting the response, is for civil servants including the MoD to be worrying about whether this or that announcement or action contravenes the purdah, or having to figure out whether Opposition and third-party requests for information on the government's response must be met to comply with the purdah even at the risk of leaking information the government doesn't want to release yet.
Civil servants are meant to spend the election period simply continuing the mundane tasks of government and reading the party manifestos so they can prepare briefs for each party on how it can best implement its policies within the existing frameworks - again, not something you want staff in certain departments to be doing in the wake of the biggest terrorist attack the country has ever seen. The Foreign Office is even meant to postpone any meetings with foreign dignitaries (such as the heads of state of allied countries) in case the inevitable photo op helps the sitting party over its rivals. This near-shutdown lasts for 4 to 6 weeks - it would surely have to wait until the dust had settled and the important initial reactions had been completed.