I know I'm not supposed to talk to him or ask for affection, but I was considering asking him to try to spend time with me a little more on the basis that I don't know how much longer I have with him and I want make the most of what little good times we have left before the divorce process makes him hate me.
That's pretty strong pursuing.
I'm not saying you can't invite him to do something with you, but it should be along the lines of "I am going to do X. Want to join me?" And then, you do X whether or not he joins you, even if it means you leave him home alone and miss out on time with him.
Definitely don't share the ideas in your post (wanting to enjoy the time you have left).
Me: 44 H: 44 Kids: 20, 16, 16, and 10 Together/Married: 22 years H announced he was emotionally detached and considering D: 4/4/16 H announced he is going to try to stay and reconnect: 5/1/16