So, I had this thought this morning, while I was lying awake, brain swimming in pain relief meds. I'll try to make it make sense, but if it's a little disjointed...
I was thinking back over the last four seasons and looking for more references when something came to mind from one episode in particular - Heroes - specifically the case where the battered woman stabs the Marine who was trying to save her from her abusive husband.
When he's talking to Stacey - after they discover her husband in hospital having been given a good kicking, and I went back and watched this to check - Danny seems much more 'emotional' with her, even more so than he normally gets when talking to suspects. His anger at her seems to be less of the variety you normally get from him where he's questioning the stupidity that leads to people's actions and more deeply seated and personal. "I do know Keith". The whole thing sounds like it's something he's witnessed over and over as a kid, like he's heard these excuses again and again. I have no doubt this is probably true as police officer but his reaction just seems overly charged for it to just be professional reasons. Honestly, I can almost picture him sitting with his mother asking her why she put up with his father's crap rather than someone who is being accused of murder.
What it got me to thinking about was the neglect/abuse we've been talking about here. It reads a lot to me like his father was one of those guys who took his frustrations mainly out on Mammy Messer and would then come for the kids if that wasn't enough. Part of me suspects that both Mammy and Louie protected Danny from getting a parental ass-kicking for the most part, and Danny saw that good deeds did not go unpunished when Dad beat on them some more for protecting him. He's grown up seeing people get nothing but hurt for good deeds. I don't think it stops him wanting to help people - in fact, I think you can put that down to 'survivor guilt'. He wants to help people because he couldn't help those closest to him. But I think it has shaped Danny's mentality that he does not deserve to be treated well or to get to receive comfort from others when it is blatantly obvious he's in need of it.
On the issue of the neglect - as I said before, I totally believe that the family under surveillance thing plays into his upbringing. Dad was too busy breaking the law, taking care of business and perhaps with stints in prison to take much if any notice of either of his kids, much less one seemingly more intelligent and with little interest in following in his footsteps. Mammy was too busy with her own problems fending off her husband's anger and probably spent a lot of time chatising her sons for behaviour that would bring about his wrath. Which left Louie holding the responsibility for Danny - someone who ultimately abandoned him too. Even though Louie was busy getting into trouble of his own, I think he saw that his brother was a smart cookie and capable of more than himself or his father. Louie probably watched his brother bury his head in his books and school work - his escape - and saw that his brother really had the means to get away from everything and have something better, which was why he pushed him away. He wanted to keep bad influences like Sonny out. But as Danny says in Run Silent, Run Deep all it really did was hurt him more.
Someone mentioned Danny's parental relationships in a previous post and you know, I think Danny struggles with his father because he honestly believes his father's criminal past (and perhaps present) and his joining hands with the devil in becoming a part of law enforcement precludes his father loving him as a son. And it is possible that Mr. Messer Snr. has so many shame issues - the law-breaking, the abuse of his family, his son making good where he couldn't - that it has put a pretty big wedge between them that it seems like a mountain that needs to be climbed to even get to start reconciling any differences.
A lot of this would explain how he acts now. The need for validation - because he never got any when he was a kid from the people he needed it from most. The relationship he has with Mac - in which he wants the fatherly attention Mac offers but never allows himself to take too much in case it goes bad. The relationship he has with Don - whereby his friend is actually more like the brother who didn't walk away and will put up with whatever curve balls Danny throws his way and without question.