ref
unhappy + -ness
unhappiness (n.)
late 15c., "misfortune," from unhappy + -ness. Meaning "mental misery" is from 1722.