Ulcers are very difficult to treat. There is no proven technique that will eliminate ulcers. They can occur as a result of trauma or due to a viral source, and every individual can have different triggers. Depending on their cause there are specific medications that can shorten their duration. Left alone, ulcers will generally diminish and disappear in two weeks.
There are many over-the-counter products containing topical anesthetic that work well for minimizing discomfort.