Hello and hope you are doing well.
Your symptoms could be due to a middle ear infection, which can spread causing a painful lump behind the ear. This could be a lymph node or sometimes the infection can spread to the mastoid bone. But if it is due to this you should have accompanying ear pain. Sometimes repetitive injuries or strain can also produce these symptoms. Inflammation of the muscles, joints and surrounding soft tissues can also cause pain. Discuss these options with your consulting doctor.
In the meantime you can take OTC pain medication Ibuprofen. Ensure to take this medication after food to avoid gastritis.
Hope this helped and do keep us posted.