Hello thanks for consulting at hcm..
Gum infection near wisdom tooth is called
pericoronitis...You will need iopa radiograph to check for type of
impaction whether enough space is there for the tooth to erupt..
The white ulcer on the gums is traumatic ulcer since the upper teeth is biting on the gums resulting in micro trauma..It might also be secondarily infected with bacteria in mouth and hence sore to chew and unable to open your mouth..
I suggest you take a course of antibiotics and analgesics like augmentin- 625 mg -twice daily, divon plus twice daily,, if you are not allergic to it and also under the guidance of your treating physician..
Do salt water gargle thrice dialy.. Drink warm water..
Also blow air with your mouth closed as frequently as possible..so that the teeth doesnt touch your gums and cause repeated pain,,,
HOpe it helps..take care...