Robert Hood, 77, from Kilwinning, North Ayrshire, had been receiving treatment in Crosshouse Hospital, Kilmarnock, but was reported missing by staff on Sunday evening.
A helicopter, dog unit and specialist teams were involved in the search for him.
His body was found on an embankment in Annanhill Industrial Estate, Kilmarnock at around 5.30pm on Tuesday.
There are no suspicious circumstances and his family have been informed, a police spokeswoman said.
A report will be sent to the procurator-fiscal.