
All symptoms are pointing to major depression disorder (MDD) also known as clinical depression. Low mood, low activity, off sleep patterns, even attempt suicide (the ocean scene) etc. a lot of people with this tend to lean to drinking to help with the sadness. There are a couple of ways to get this one being caused from his environment (all the emotional abuse, grandma being sick etc)
It’s not likely he has liver problems/cancer since his drinking has only been going on for 1-2 months. Liver problems can develop years later after heavy drinking and even then some people don’t have any problems. When someone does have liver problems there are usually signs.

+ Liver cirrhosis is asymptomatic at early stages too so it may be hard to identify one unless going to the doctor.
But honestly speaking, any illness either of the body or the mind that causes sleep walking can be his diagnosis (Just ruled out any mental illnesses as others were already putting it out as their guess).
And also, his attempt at suicide wasn't really an attempt but more of an "accident" as he wasn't really in a concious state. He was sleep walking at that time too, and I don't think Dan wants to die (atleast from the panel of JJK telling Dan that he'll bite the dust soon in that little town).
In the end the most probably cause of his sleep walking is his accumulated years of mental fatigue + sleep deprivation (and/or coupled with sleep disturbance) + alcohol consumption.

From a nursing student POV there are no signs indicating any kind of liver failure. For cirrhosis there are usually symptoms like itchy skin, weight loss, vomiting, memory problems and more. Plus it is usually caused by years of heavy drinking. Dead give away this isn’t cirrhosis….a sleep specialist (doctor) can not diagnose cirrhosis.
I do think he has depression but even in this case a sleep specialist can’t even diagnosed depression. I’m guessing he was told he has a sleeping disorder like somnambulism which is sleep walking disorder which can be caused from stress, anxiety, alcohol, genetics and more.

From a pharmacist's standpoint, that is why I stated he may be experiencing early liver cirrhosis which are again asymptomatic, and again he was drinking before he met jjk too (we'll never know the extent of it but he's drinking anyways, and seeing that he is also malnourished it could contribute to speeding up the spread of any illness he may experience). Not every problem manifests in early stages, some may only come up once they are already severe. But then again, I added that the most probably diagnosis could be an illness of the mind (w/c I initially did not include as others were already speculating it) as he has been drinking (alcohol consumption) + overworked + sleepless/sleep deprivation + malnourished.

I mean the only thing is there are zero signs of liver failure. A ton of people are even saying cancer like lung cancer which is also crazy since there are so signs. He went to a sleep specialist not an oncologist or psychiatrist. In real life yes, you can drink for a short amount of time and still get liver failure (not as common) but in this specific situation no. He was likely diagnosed with a sleeping disorder.
The cause/diagnosis can be any of or not the following:
- Alcohol consumption
- Stress
- Sleep deprivation
- Obstructive sleep apnea
Well, the possibility of him having liver problems (e.g, cirrhoss) could also cause sleep disturbances = less sleep = sleep deprivation (partnered with stress and frequent consumption of alcohol leading to nerve damage) = sleep walking
In addition he is:
- malnourished (bone thin structure based on his visible rib structure)
- stressed (and probably experiencing some sort of psychological issues as demonstrated(?))
- sleep deprived
- overworked
- probably developing severe alcoholism
- and if I can see his skin he'd probably be pale from the lack of nutrients (alcohol can interfere with the usage of vitamins and such)
But eh, who knows!
See you in 10 days! ~