An extensive search operation was launched for Mr Davidson, 73, from Dalkeith, when he was reported missing on 26 April.
His body was found by a member of the public in the River North Esk, near Dalkeith, three days later.
Police said there were no suspicious circumstances.
In a statement, his family said: "We wish to thank the local community and police for their understanding and support at this very sad time."
Sgt Stuart Aitchison, of Police Scotland, said: "Our sympathies are with the family of Thomas Davidson and we wish to extend our gratitude to them for their assistance over the course of our search operation."
Police have confirmed the body of a man recovered from a river in Midlothian is missing pensioner Thomas Davidson.