Mr MacDougall died early yesterday aged 60, having suffered from asbestos-related cancer for more than two years. The Prime Minister mourned the loss of a "personal friend" whom he had visited on Monday at the Victoria Hospital in Kirkcaldy.
But even as tributes were coming in for the popular former leader of Fife Council, the Labour Party was preparing for a fresh crisis, with sources privately admitting it was a "personal tragedy and a political disaster".
Mr Brown has been plotting an autumn recovery plan, which will include a possible Cabinet reshuffle, a morale-boosting speech at the party conference in Manchester and a mini-Budget packed with giveaways.
But insiders believe his efforts could be in vain if Labour loses a possible November by-election – and the SNP is 1/4 to win it. Defeat in a previously safe seat neighbouring Mr Brown's own constituency would almost certainly precipitate a leadership challenge. It would be the third by-election lost by Labour in the past six months, following the shock loss to the SNP in Glasgow East and defeat by the Tories at Crewe and Nantwich.
One MP, who did not wish to be named, said: "This could be the most futile recovery plan for Gordon. If he loses the election there is a high chance that he will step down voluntarily."
A senior Scots MP said if Labour lost the seat in the PM's own backyard, the "game is up". He went on: "He is going to make a big speech at the Labour conference in September to fight for his political life. If he then goes on to lose Glenrothes, he is stuffed.
"If we lose this, Gordon will be the only Labour MP in Fife, which is just untenable. He has a massive test ahead of him, and he cannot afford to fail."
The Prime Minister has been hoping to launch an economic recovery plan at Labour's autumn conference in September. A reshuffle has also been pencilled in for the autumn.
Workers who lost out under the removal of the 10p tax band are also due to receive more money in their pockets from late October.
But any potential pre-election giveaways could be wasted if the strategy does not win over disgruntled voters or overwhelm a sleek SNP machine.
Mr MacDougall had a majority of less than 11,000 at the 2005 general election, and it needs a 14.3 per cent swing to the SNP for the Nationalists to seize it – much less than the 23 per cent swing needed to wrest Glasgow East from Labour's grip.
Labour chiefs said that, despite the majority, they were starting from scratch to keep the seat. The party is planning to move the writ for the by-election when parliament reconvenes from its summer recess, in the week beginning 6 October, delaying the poll until later that month or early November in the hope that it gives Labour a chance to catch up on the inroads made by the SNP.
However, one Labour MP feared that strategy could backfire, giving too much time to the SNP to entrench itself.
The Nationalists are quietly confident that they can take the seat, a view affirmed by the bookies, who yesterday offered short odds on an SNP victory.
The Nats' campaign machine has geared up in the area since last October, and it has spent the past few months canvassing 40,000 constituents after taking the corresponding Holyrood seat last year. The SNP made inroads in the local authority and now runs Fife Council jointly with the Liberal Democrats.
It is believed the Nationalists will push for an early by-election, pointing out that Labour moved the writ for a quick election in Glasgow East because it was to its tactical advantage, and accusing it of hypocrisy if there is a delay.
One hope for the Labour Party is that the Liberal Democrats are organised enough to steal votes from the SNP.
One MP raised the prospect of the Glenrothes by-election being coupled with another for the Holyrood constituency of Jack McConnell. The former First Minister is expected to give up his Motherwell and Wishaw seat in the Scottish Parliament to take over as High Commissioner to Malawi.
"This would be a good time for Jack to jack it in," the MP said. "The likely scenario is we go back (to parliament] in October, then call it. We go to the polls in November and have possibly two by-elections."
However, one Labour source questioned the wisdom of delaying the election until the dark nights of November.
Possible contenders for the Labour candidacy include Alex Rowley, Mr Brown's election agent and the leader of the Labour group at Fife Council; Christina May, the former MSP who was ousted last May, and Claire Baker, the list MSP for Mid Scotland and Fife.
The Prime Minister may also come under pressure to get involved in the by-election.
He was able to steer clear of the battle for Glasgow East, with Downing Street citing the convention that prime ministers do not get involved in by-elections.
However, as the only Labour MP whose constituency neighbours Glenrothes, Mr Brown has to take on some duties for the patch, which could make it difficult for him to avoid travelling to the seat.
Meanwhile, David Miliband, the Foreign Secretary, renewed speculation about his leadership ambitions yesterday, when he said he had no regrets about an article he wrote for the Guardian last month, which was largely interpreted as a pitch for the top job.
• ANALYSIS: Could it be a repeat performance for SNP?
• BROWN'S TRIBUTE: 'A good friend and servant of people'
• SCOTTISH LABOUR: Widespread support boosts Gray's ranking
• OPINION: How Labour can win back hearts and minds in Scotland
• OBITUARY: John MacDougall