No, papilledema can not be caused by anxiety. Anxiety is a psychiatric condition which does not translate into increased levels of pressure in the brain, which is what is require to produce papilledema. However, many of the symptoms of papilledema (such as blurry vision and dizziness) may overlap with the symptoms of a panic attack or anxiety disorder.
Was the papilledema you experienced actually diagnosed? That is, did a doctor
look into your eyes and tell you that there was swelling in the optic discs? If so, this is a very serious neurological finding and requires extensive workup. There are several causes of papilledema, but they usually involve swelling of the brain, either from tumor, infection, or other cause, and so papilledema must always be treated aggressively.
If on the other hand, you simply experience blurry visions and similar symptoms, this may have been an anxiety attack and not papilledema at all.
However, an anxiety disorder or panic attacks can be a very debilitating condition that also should be treated. There are a number of antidepressant and antianxiety medications that can be helpful in controlling the anxiety symptoms. Either your primary care doctor
or your psychiatrist
would be able to help you make a decision about appropriate treatment.