I am sorry to hear you are worried about your Border collie. My name is Rebecca. I am a veterinarian and will do my best to help.
Yeast infections are not common in dog mouths, and when they do occur, they can still open their mouths, and usually still eat. Can he open his mouth at all? Is he able to at least drink?
Mouth pain in older dogs can be caused by a tumor in the mouth, infected teeth, and a condition called MMM (masticory muscle myositis) where the muscles of chewing are painful and it is impossible to open the mouth more than an inch because the muscles get so tight.
If he can't drink at all, he is in danger of dehydration. If he can drink, I would start him on pain medication (by mouth if I could, by injection if I couldn't), test him for MMM if it seems like that is what he might have (there is a blood test, and the treatment is steroids). If he can't drink, I would start him on supplemental fluids.
If you check his gums are they pink in color? Can you take his temperature?