Middle age is miserable, according to a new economic study which pinpoints 47.2 years old as the moment of peak unhappiness in the developed world.