By 4.30am on Wednesday, many Democrats looked despondent, with some appearing close to tears.