The perfection of life is to remember Narayana (Krishna) at the time of death.
The entire Vedas are meant for the understanding of karma, jnana and yoga–fruitive activity, speculative knowledge and mystic yoga. Whatever way of spiritual realization we accept, the ultimate goal is Narayana, the Supreme personality of Godhead. The living entities are eternally connected with Him via devotional service. As stated in Srimad-Bhagavatam, ante narayana-smrtih: the perfection of life is to remember Narayana at the time of death. Although Maharaja Bharata appeared in the royal family, he became neglectful and took birth as a deer. Even though in the body of a deer, Maharaja Bharata did not forget the Supreme Personality of Godhead; therefore when he was giving up the body of a deer, he loudly uttered the following prayer: “The Supreme Personality of Godhead is sacrifice personified. He gives the results of ritualistic activity. He is the protector of religious systems, the personification of mystic yoga, the source of all knowledge, the controller of the entire creation, and the Supersoul in every living entity. He is beautiful and attractive. I am quitting this body offering obeisances unto Him and hoping that I may perpetually engage in His transcendental loving service.” Uttering this, Maharaja Bharata left his body. Because he was very cautious within his deer body, he took birth in a brahmana family as Jada Bharata. During this lifetime, he remained perfectly Krishna conscious and preached the gospel of Krishna consciousness directly, beginning with his instructions to Maharaja Rahugana.
Source: A.C. Bhaktivedanta Swami Prabhupada (2014 edition), “Srimad Bhagavatam”, Fifth Canto, Chapter 14 – Text 45