Rinse your mouth with "warm salt water". It will definitely be painful and burn when you do it but helps.
If you are unable to eat, use a numbing gel (benzocaine gel). You can enquire for the same with the local pharmacy or search for brands available (Mucopain, Oragel etc;).
Next Steps
Most such ulcers become tolerable in 2-3 days. If it's persisting, it needs a proper evaluation and consulation by a dentist..
Health Tips
Benzocain gel can be potentially allergy causing for some. Please be advised to use them at your discretion and preferably after a doctor's evaluation.