Hi.Welcome to HEALTHCARE MAGIC..
I have gone through your query and can understand your concern.
As per your symptoms you should have some temporomandibular joint problem. Temporomandibular joint is a bilateral joint situated just in front of ear & aid in opening & closing of mouth.
Sometimes a tear in ligament or muscle can take place with forceful opening of this joint as in yawning. You would have a clicking sound & pain on movement of joint.You can do following remedies
1. Take a anti-inflammatory medicine like acetaminophen/
ibuprofen along with
muscle relaxant such as chlorxozazone.It will reduce pain in movement of the joint
2. Do hot water mouthwash by keep hot water inside mouth for 2-3 minutes, it will help reduce the pain
3. Don't wide open the mouth. Open as much as necessary. Be extra careful during yawning.
If problem persist visit a dental surgeon
Don't worry you would be fine
Hope this information helps.