Sat in gaol, distraught, longing for the past (9)
I believe the answer is:
nostalgia
'longing for the past' is the definition.
(I've seen this before)
'sat in gaol distraught' is the wordplay.
'distraught' is an anagram indicator.
'sat'+'in'+'gaol'='satingaol'
'satingaol' is an anagram of 'NOSTALGIA'.
(Other definitions for nostalgia that I've seen before include "Longing for what's gone" , "A sentimental longing of analogist" , "Looking back with fondness on the past" , "Wistful remembrance of analogist" , "Sentimental feeling of analogist" .)