A man whose terminally ill brother was refused disability benefits has accused the Department for Work and Pensions of being "shambolic and incompetent".
James Oliver, 49, could "barely walk" and was incontinent due to liver disease before he died on 9 April, his brother David Smith said.
But the DWP denied Mr Oliver Personal Independence Payments (PIP) after he scored zero points in an assessment.
The DWP said its procedures were followed correctly.
Several months after Mr Oliver's death in Hastings, one of his children found a letter inviting him to an appeal hearing about the decision.
Mr Smith said he had told the department his brother was dead and described the letter as "insulting".
The DWP said it was "very sorry for the distress caused" by the letter and it was "looking into this to prevent it happening again".
Mr Oliver had suffered chronic liver disease caused by alcohol dependency for several years, but his health took "a nosedive" in 2016 when his other organs became affected, his brother told the BBC.
"That left him barely able to walk," Mr Smith said, adding that it would take Mr Oliver two to three hours to walk 500m to the nearest supermarket.
"He had to stop every few metres for breath because he was gasping," he said.
"He had no control over his toilet habits and was so embarrassed. He'd go out and soil himself."
Mr Oliver applied for PIP - the benefit that is replacing Disability Living Allowance - in March 2018.
How does PIP work?
PIP is made up of two parts: the daily living component and the mobility component, according to the charity network Citizens Advice.
Each part can be paid at one of two rates, either the standard rate or the enhanced rate.
During a PIP assessment, a health professional will give a claimant a score between zero and 12 on a range of activities.
The rate you receive depends on the number of points you score - a higher number puts you on an higher rate.
The assessments are done on DWP's behalf by the private companies Capita and the Independent Assessment Services (formerly called Atos), which have come under criticism for scoring claimants too harshly.
Mr Oliver was assessed by a paramedic, who "gave him zero points on everything", which meant he did not receive the disability benefit, his brother said.
He applied for a review of the decision - called a mandatory reconsideration - but it was upheld in June 2018.
Doctors gave Mr Oliver 12 months to live last summer, according to Mr Smith, although the DWP said it only had a record of the diagnosis from March this year.
Currently, a terminally ill person only qualifies for fast-tracked access to benefits when their death is expected within six months.
But the government is reviewing the rule after the All-Party Parliamentary Group for Terminal Illness said it was "outdated, arbitrary and not based on clinical reality".
Without the benefits payment, Mr Oliver was not able to heat his home and he resorted to using a hot water bottle during the day to keep warm, Mr Smith said.
He said his brother "gave up" after his mandatory reconsideration was rejected and turned to alcohol.
"He just downed more or less anything he could lay his hands on at that point and it was the beginning of the end. We couldn't bring him back from that," Mr Smith said.
After collapsing on the way to the supermarket, Mr Oliver was taken to the hospital, where he was told he would soon die.
According to Mr Smith, his brother said: "I can't believe it I'm going to die and I'm still not sick enough to qualify for PIP."
March 2018 - Mr Oliver makes a PIP claim
May 2018 - His claim is denied
June 2018 - His mandatory reconsideration is disallowed
July 2018 - He appeals the decision
April 2019 - Mr Oliver dies
August 2019 - The DWP invites Mr Oliver to an appeal hearing in September
A Facebook post about Mr Oliver's death had been shared 107,000 times by Friday afternoon.
Since writing the posts, Mr Smith says he has been "bombarded" by similar stories to his brother's.
A DWP spokesperson said: "Our thoughts are with Mr Oliver's family at this difficult time."