Hello,
You ate a bar of soap. Now your mouth is hurting, and you are unable to swallow. Eating soap can have some harmful side effects. Eating a small amount of soap might not do permanent damage to your body but it can cause 
indigestion, nausea, 
vomiting or 
diarrhea. Soaps are not food-grade, eating soap can cause inflammation in your tongue, throat, and may also cause other parts of the body to swell up. 
It is a temporary reaction to harsh ingredients in the soap or a symptom of an 
allergy. You can take antihistamine, at bed time for 3-5 days to control the symptoms of allergy. You can take antacids or PPIs in case you develop 
acid reflux.
In some cases, symptoms may make it difficult to breathe or swallow. Take  liquid food after cooling for a couple of days till the wound heals. Eating soap can damage your liver, do not do it again. Take multivitamins with zinc and iron. Take it once daily for 10 days.
Take care. Hope I have answered your question. Let me know if I can assist you further.
Regards,
Dr. Nupur K., General & Family Physician