The line from "If" that shares a similar theme with the excerpt from The Jungle Book is:
"If you can trust yourself when all men doubt you."
Both passages deal with themes of self-reliance, honor, and the challenges of leadership. In the excerpt from The Jungle Book, Akela acknowledges the doubt from the other wolves and stands by his rights and dignity, while in the line from "If," there's an emphasis on trusting oneself despite others' skepticism or betrayal.