Okay, first of all, relax. You are one of an extremely large group of people who go through this at some point in their lives. You're going through an existential crisis, and it's completely normal for just about everybody. It's very important for you to understand this. Everyone is worried about their life and what comes when it's gone, and it might take some time to deal with.
First of all, it's important to deal with your anxiety that makes you think you're going to have cancer. It's likely very irrational and isn't doing you any good. There are lots of ways to deal with anxiety of all sorts, like asking yourself "Does thinking about this make me happy?" or drinking some anxiolytic (anti-anxiety) tea, like chamomile. Helped me a lot with anxiety that came from a different problem, anyway, and now I'm 99.9% over it and I've become a lot happier as a result.
You're right. If there isn't an afterlife, it would feel like we're sleeping. It would feel like what it felt like before you were born, which is simply having no feeling at all, and it's important to come to terms that this is likely what will happen one day. Everyone dies, but there's a juicy section before that called life, that can allow you to experience the grandeur of existence.
On a personal level, and I don't know if this will help you too much, but I coped with the very likely reality of there not being an afterlife by taking comfort in science and philosophy. There are simply so many beautiful things that we, as living people, are so privileged to experience, and a lot of that, at least in my eyes, comes from science revealing it to us. Again, not sure if this will help you, but I went through the same thing you're dealing with. When I was a lot younger, I had to be excused from class when they were discussing global warming because I was so worried about eventually dying.
The absolute, most important thing you can do for yourself is to create or find meaning in your life. What keeps you going, what are your aspirations, that sort of thing. For me, I just want to continue being in love, and learning more things, as well as being a good person who can provide happiness for others. There is probably no God who's judging whether or not you're going to heaven for eternity, so just take comfort in how fantastic the world is when you look at it from a less worried perspective. Jeez, I'm not sure if you like looking at pictures of nature or anything like that, but if you are, look up 'Fjords' on google. That sort of thing is so beautiful to me and so worth sticking around to see. Everyone has some meaning in their life, either to worship their God, or to fall in love and raise a family, or whatever they decide.
Look up carpe diem as well.
Hope this helps, at least a little bit. It won't always be this way, you have to understand that. You'll feel better, as long as you want to feel better.
“Mutual caring relationships require kindness and patience, tolerance, optimism, joy in the other's achievements, confidence in oneself, and the ability to give without undue thought of gain.”