The swelling behind Rt ear is most probably a lymph node usually due to infection in that ear. However scalp infection needs to be ruled out.
The lymph node becomes tender when it gets inflamed due to spread of infection to it. Its main job is to prevent further spread of infection.
With the history provided by you it is difficult to say what caused that lymph node to get inflamed. More details are needed like is there or was any ear discharge
, any nasal problem etc.
You please show him to an ENT specialist
who can examine him and determine the cause of his lymph node enlargement and treat him accordingly.
You may show to a Psychiatrist
with regard to your son's problem of worrying, getting stressed. Earlier his migraine
may have relation to it.