hello there ,
TMJ problems can be associated primarily with the pain and soreness in the upper front teeth and swollen gums
as you have mentioned .
Swelling in the gums indicate inflammation of the gums known as gingivitis
, it is caused due to poor oral hygiene
, deposition of bacterial plaque and calculus deposits deep in the gum pockets and on the root surfaces of the teeth.
you may also experience bleeding gums
, pain , sensitivity and redness in the gums .
This needs professional scaling and root planing by a dentist
to remove all the irritants ,plaque and calculus which will subside the gum swelling rendering good oral health.
Pain in the upper front teeth is may be due to some dental infection or decay process , it can be confirmed by taking a X ray examination of the area accordingly treatment can be planned.
i hope this helps ,