Welcome to Healing Well! Sorry to hear you're suffering. It sounds like you irritated your esophagus with the capsule, then irritated it more in your attempt to clear things via vomiting. Stomach acid coming up into your esophagus caused more damage to the already irritated tissue.
Please call your PCP's office and get an appointment or at least get some advice. If this persists, it's a good idea to see a GI specialist, as he/she can see what's going on and provide you with help clearing things up. There is a prescription drug--Carafate suspension--that coats the esophagus (and stomach) and helps protect it and can make it more comfortable. You might want to ask about that.
In the meantime, be sure to eat only liquid or creamy foods, as anything (even rice) that has texture, can scratch and irritate things further. I've had esophagitis (which is what you likely have) many times, and I found egg custard to be very comforting and nutritious during my recovery. It's common to lose weight as your esophagus heals for obvious reasons.
Stay away from spices, acidic foods/beverages, and alcohol until things heal.
Nissen Fundoplication 2/09
"Whatever you fight, you strengthen, and what you resist, persists.”
“Worry pretends to be necessary but serves no useful purpose”
“Accept - then act. Whatever the present moment contains, accept it as if you had chosen it. Always work with it, not against it.”