Poor little dog--he has suffered so much, and has been traumatised.But with love and care and lots of cuddles he will regain his confidence.
He needs to be left for very short periods of time in the beginning until he knows you are coming back.Make sure he has something of yours for the smell and all of his toys, the radio may help in the background as well.
When you come back give him the biggest love ever and pet and stroke him , telling him that he is a good boy and so on.Reward with a tit bit
This kind of training may take a few months but you and he will get there in the end
Play lots of games with him outside when you can , a large football is ideal.Cuddle and praise him as often as you can , he needs so much from you at the moment , but will slowly and gradually learn to trust again, although sadly he will never quite forget..
My little JR cross was a 3rd time rescue dog when I got her 4 years ago , and had been badly treated.It took about 18 months for her to trust again completely, and not to cower and wet at the slightest thing.She reverted to being a puupy again and had to learn how to play.Four years on she is brilliant, but there were times when I thought we would never make it as companions.
you have a difficult road ahead to build up the trust and confidence in your little pet , but believe me it will be worth it.
All the very best , let usknow how you get on .