In the right context all are acceptable.
1. He was sad when he went away.
2. He went away [in a sad manner / looking sad].
3. He was happy when he went away.
4. He went away [in a happy manner / looking happy].
2. and 4. could be rephrased very slightly -- with a comma, or by
preposing the adverb -- to yield a different meaning. Of the two,
preposing the adverb is the more idiomatic and less ambiguous turn of
phrase.
He went away, sadly.
Sadly, he went away.
It was [sad / unfortunate] that he went away.
He went away, happily.
Happily, he went away.
[It was fortunate / We were lucky] that he went away. Thank goodness he went away.
CJ
PS. My instinct tells me you want to say 1 and 3.