You don't say whether it is an upper or lower molar, but if you say that the lump is behind the ear, then it has nothing to do with your dental problems.
Dental infection can spread to the neck nodes, but usually stop at least 2 inches below the ear, so a swelling behind the ear is not usually dental in origin.
But......anything can happen in the human body, my advice is to wait for at least 48 hours ans see what happens.
J2PUR ( or something) is a dentist and his opinion will be valuable.