Erupting wisdom teeth can potentially come with a few problems, ulcers being one of the more common ones.
When wisdom teeth begin to erupt out of the gum as like in your case now, it is not unusual for infections to set in.
This is because small morsels of food get trapped underneath the gum flap, and if left there uncleaned, will result in an infection of the gum overlying the wisdom tooth. If this happens, the gums around the erupting wisdom tooth can ulcerate, get inflamed and discomfort usually sets in.
This condition is called pericoronitis.
If the pericoronitis infection spreads and gets worse, you may experience other symptoms such as a fever, sore throat or even swollen lymph nodes and general malaise.
I would strongly encourage you to see your trusted dentist to have the infection treated and to discuss with him/her the benefits, pros and cons and risks of having that wisdom tooth removed, to potentially prevent future bouts of pericoronitis.
I wish you a speedy recovery from your ulcers and good luck in finding a dentist you can trust and have a rapport with.