Is Salvation a State Function? Does the salvation of a believer depend on the present state of her faith or are the different life transitions taken into account?

Suppose a believer leads a life of faith in Christ. At the end of her life she falls away for some reason, say persecution. Is she saved?

There are verses that seem to support both. 

Only the end matters – 


  Matt 24:13   But he that shall endure unto the end, the same shall be
  saved. 


The life matters –


  Hebrews 6:10 For God is not unrighteous to forget your work and labour
  of love, which ye have shewed toward his name, in that ye have
  ministered to the saints, and do minister.


So is salvation a state function or a path function?
Your question presupposed that salvation is acted out by the believer. Coming at it from a reformed/calvanistic point of view here is out I would answer it. 

Salvation starts  by God in eternity past through his election. Here is how Wayne Grudem describe election in is book Systematic Theology chapter 32. (Sorry could not get a direct link to the page)

Then if God calls those who will be save, then the believer receive the gift of salvation. In God eye, the believer is already in heaven. Then salvation is an act of God, and also God is the one responsible for the calling and the keeping on the path of faith. 

Here is how Romans present this thought:


  For those whom he foreknew he also predestined to be conformed to the image of his Son, in order that he might be the firstborn among many brothers. And those whom he predestined he also called, and those whom he called he also justified, and those whom he justified he also glorified. (Romans 8.29-30) ESV


God chooses, the christian respond in faith and God keeps the believer during all the life of the believer. Salvation is then a state matter.

Although the end matter as well, a Christian is called to perseverance in his faith. If he was to fall he would be sinning, not loosing is salvation. Because God choosed the believer before any good work or any faith on his part. The sinning does not rob salvation, but his joy , his peace and different gifts.

In 1 Jonh one of the test of a true christian is his walk in the light.


  If we say we have fellowship with him while we walk in darkness, we lie and do not practice the truth. But if we walk in the light, as he is in the light, we have fellowship with one another, and the blood of Jesus his Son cleanses us from all sin. (1 john 1.6-7) ESV


In a way salvation is a path, but not unto salvation but unto holiness.