Yes, your marriage will be hurt by this. While husbands would be understanding of a friend you met at the gym or in a store or at work, who was dying, the fact that you met online sets off alarm bells.
I'm A Husband, I Would Be Jealous
As a husband and father, I can say that I'd be very jealous if my wife told me that she met this guy online who now loves her and is dying.
While I would be sympathetic about the fact that the guy was dying, I would not be very sympathetic to my wife's feelings. Where was she (you) going with this? What were you doing basically leading a guy on online?
I think pretty serious questions about your marriage and the future of your relationship with your husband are raised by this.
Contrary to the beliefs of some, I don't think that love online is harmless. I really think that people meet, fall in love, ruin
marriages, develop new relationships, find new marriages, all online. I know two couples where this happened personally.
So, you've already done some damage here raising the hopes and expectations of a dying man...do you also want to ruin your marriage?
Dying Isn't The Point
The fact that he's dying is not the point. The fact that you have basically betrayed your spouse is the real issue.
Forget The Dying Guy
So, what do you want to do about it. In my opinion you have three options:
Good luck, (stick with the living)