Elavil is the brand name of a medicine called amitriptyline. It is basically an anti-depressant and belongs to a group of medicines called Tricyclic Antidepressants (TCADs). It is also used in the treatment of pain of neuropathic origin.
Ultram is the brand name of a medicine called tramadol. It is indicated for pain that is refractory to conventional medicines such as aspirin, acetaminophen etc. One of its rare side effects - even when used alone - is convulsions.
When Elavil and Ultram are used simultaneoulsy, then the risk of convulsions increases. I have a very strong feeling that this happened in your case.
You have not given details of birth control method being used which would helped to look at your case in totality.
Your doctor could try carbamazepine (brand name: Tegretol) - a medicine that is also indicated for neuropathic pain though basically it is an anti-convulsant. Thus both of your problems may get solved.