Well, I hate to be the voice of reason, but coughing can cause your throat to become irritated and you could cough up some blood.
The title of this is misleading since it implies you are throwing up blood, which is not normal and can indicate an ulcer.
If you have been to the doctor and diagnosed for pneumonia, why didn't you bring up these issues with him then? Being light-headed can be caused by poor nutrition, as well as being ill with a cold, the flu, or pneumonia.