Hi,I'm genuinely sorry to hear about this. No matter what the relationship, it's always sad when our parents near the end of their lives.
In the event you're looking for advice and not simply venting, please take this opportunity to connect with your dad in any way that you can. You will regret the missed chance later if you don't. You both have an opportunity to set aside all of the friction and distance that accumulates between father and son and just be together at the end of his days. Even if he doesn't do this you still can.
You won't be able to heal all of the resentments that may have built up over the years, nor should you try--now is not the time to talk out and negotiate past grievances. Just go and be with him. Talk to him about the things he likes to talk about, give him the news of your life, and just...be with him. If he wants to go deeper and talk about dying, let him--he's likely to be scared about it but may not let it show. Go with it--it will be difficult to talk about but ultimately rewarding for both of you.
Remember that at one time you were his little boy, the center of his world. In your eyes he was bigger than Superman--if you have kids of your own you know what I mean. Let your mind and heart go back to those times. I would guess that you're not the type to show your emotions, but now is not the time to be overly stoic--go ahead and weep. Soften your heart, help him to be comfortable and at peace, and savor these last days with him.
I'm sorry if you found this advice to be intrusive. I have been where you are and live with the regrets of not spending more time or saying some important things, and my hope is that you might be able to avoid this.
I wish you well.