I didn’t know before I looked it up that this was written by Pete Ham and Tom Evans of Badfinger. It was released on their 1970 album No Dice. It was pretty bad, an object lesson in making the least of a good song. However I must not be too unkind as Ham committed suicide in 1975 and Evans followed suit in 1983.
Harry Nilsson covered it for his 1971 album Nilsson Schmilsson; he and producer Richard Perry transformed it and realised its potential. It reached No 1 in Britain and the US in 1972.
For completeness I include Mariah Carey’s 1994 version, released shortly after Nilsson’s death from a heart attack at the age of 52. I find it overwrought and cliched. It reached No 1 in the UK and No 3 in America.