No. Euthanasia is not an appropriate response simply because a dog has consumed something harmful. It should generally be considered only as a last resort for untreatable pain, severe medical conditions, or dangerous behavioral issues.
If your dog ate something inappropriate, contact a veterinarian promptly for proper care rather than considering euthanasia.