I like to teach that the tense in a reported clause is "the targeted tense - 1".
In you example, it should be:
He said he would follow me to the end.
Let's look at the time line:
he said "it" here [him following you]
| -------------------------------------->
V [
----o---------------------------o--------------------------------------->
^
|
now
In the time line above, [him following you] is after (in the future compared to) [him saying it]. From that, you can make a "base sentence":
He will follow me to the end.
That's what you would say if you're in the same time spot as [he said it]. Now, take the "will" and "minus 1" it:
will - 1 = would
... and put that in your reported clause
... (that) he would follow me to the end.
My "minus 1" rule:
future/can --> modals:
will - 1 = would
can - 1 = could
present --> past:
present perfect - 1 = past perfect
present continuous - 1 = past continuous
past --> perfect:
past simple - 1 = past perfect
past perfect - 1 = past perfect (already furthest in the past)
Some examples:
"I will give you the money." --> He said he would give me the money.
"I can play the guitar" --> He said he could play the guitar.
"I have finished my work." --> He said he had finished his work.
"I'm doing the laundry." --> He said he was doing the laundry.
"I gave her the doll." --> He said he had given her the doll.
"I have made dinner." --> He said he had made dinner.
That's just a little trick I came up with at some point that works.