Your sweet dog needs to be seen by a veterinarian. Please do not give over the counter pain medications as most human pain medication is unsafe for dogs. Your veterinarian can prescribe the proper medication(s) to ease your dog's discomfort.
First, I wonder why you haven't brought the dog to the vet. If it is money, they will work out a plan with you. IF desperate you might try ecotrin or coated aspirin. Be careful not to overdose and give food with it or peanut butter. If the dog doesn't take food, forget pill, you need to see a vet!!!
Thanks! Your answer is awaiting moderation.