Each and every person who dies committing an act of full cooperation with grace, such as choosing to accept death rather than give up the Faith, certainly dies in a state of grace. Any act of full cooperation with grace whatsoever is incompatible with the state of actual mortal sin. When a person who is in a state of actual mortal sin cooperates fully with grace, such as in an act of martyrdom or in any act of true full spiritual selfless love of God or neighbor, this interior act of full cooperation with grace necessarily includes implicit perfect contrition for all sins. The person is thereby forgiven of all sins and is returned to a state of grace, prior to death.
See this article for more on implicit repentance.