David Ferrer froze at vital moments as he lost to Roger Federer at the ATP World Tour Finals at the O2 Arena.