Libby2999 has given you excellent advice. Just be patient and support him - that's all any of us can do in such a situation. He's lucky to have a good friend like you.
If you know what kind of lung problem it is try researching it. When you have more info on it you can ussaly do more about it. Also, just being with him will help him feel better. The headache may be from stress, the stress that it can and by what your saying will be fatal. Lung transplant? If anything he's probably going thru very hard emotional things.
Do you go to church/practice a religion? Maybe doing so and asking for help through the religious group and praying (if that's in there) for him to get better and don't forget you have to make sure your doing fine too.
And are you planning on staying bf and gf? That's your choice but I'd like you to, if pissable, still be a bestfriend to him. I feel like I should do more to help but I'm afread all I can do is talk to you and support it. Message me if you want more ways to help keep him feeling better. (I can't wright all night long) but I'd be more than willing to help.
Also quick, if it's possible, trying going out and doing more things with him and some more of his friends. Go camping if you like to, see a movie, have a party for the heck of it, sports he loves (watching or playing) ect. Physical activity is the worlds best medicine (ussaly) and he would feel much better! Try not to dwel on it cuz then it might make him feel ever worse. Just keep and eye on his physical medical health.
hey dear
what sort of lung problems he has?
what are the symptoms?
is his headache related to his lung problem?
how old is he?
might be one pathology or 2 unrelated problems
please give more details of his medical problem
difficult to judge from these descriptions