A word to describe a person who prefers to be sad
I don't think there is a single word for this. Melancholic is close, but doesn't really imply a desire to remain so. Calling him a loner is also close but doesn't fully denote a lack of enthusiasm or motivation for anything he keeps to himself.
However, it does sound a lot like self-defeating personality disorder:
The person may often avoid or undermine pleasurable experiences [...]
[and] rejects opportunities for pleasure, or is reluctant to acknowledge enjoying themself
There's more to it than that, but since this is not an appropriate place to practise amateur psychology I will leave it there.