DH is like you describe in many ways but doesn't treat us quite as poorly as yours - he is quite kind but not empathetic, supportive or overall very helpful unless it is strictly on his terms (which is difficult once you have kids). Overall, though I could have written this post.
DH is a middle child and I see similarities with my middle sister. They have this almost pathological need to be liked by everyone, maybe because they were lost in the middle growing up.
I think it's ego stroking for DH - he loves the feeling of helping and getting thanked for it and then telling the story to anyone who will listen. I don't expect to be thanked every time I do something around the house but he does partly because of his ego and also because he does so little overall. It takes FOREVER for home repairs that he is going to do to get done. God forbid we ask about when it might get done too.
OTOH, I too have plenty of faults as an adult child of an alcoholic so I do have to be careful not to call the kettle black