Firstly, for mild gum swelling, local ice can be applied to achieve scalp pain relief while targeting the swollen gums.
Secondly, if ice packs are ineffective, non-steroidal painkillers such as Tylenol tablets and ibuprofen extended-release tablets can be taken after meals to provide anti-inflammatory and analgesic effects (not suitable for patients with peptic ulcers).
Thirdly, if the pain is not relieved after using the above regimen, you need to consider whether there are other conditions causing the scalp pain and you need to visit the hospital to improve the examination and further clarify the cause of the scalp pain.