The quote seems to be an affirmation of one's life and the experiences that one has had. This sentiment echoes the value of one's life, the attachments formed, and the accomplishments undertaken in one's life. There is an overriding sense in the quote of the search for meaning and establishment of relevancy in the arc of one's life within the quote. Your introduction to the analysis of this quote could involve how one determines meaning in their lives and the importance one attaches to such relevancy and purpose, almost to motivate one to exclaim that their lives were not one lived in vain. The body paragraphs could revolve around how one goes about establishing meaning which would preclude the fear of living one's life in vain and the conclusion could discuss how one assigns meaning to their lives.
"I have not lived in vain" means that everything I have done or experienced in life has a purpose. Quite often people go through life without stopping to reflect back on their experiences. Bad or good, the outcome and the lessons one learns from ones experiences makes life what it is for the person.
To say that I have leaved means that I have taken each event that happened in life and gained from it. When a person skins his knee he learns how to care for a skinned knee. If a person loses a loved one, he learns how to handle grief and may turn around and use that experience to be able to better handle a future situation or even to help another.
No moment bad or good should be considered a waste. Life should be lived doing ones best, but when bad things happen one needs to use the experience to learn from it. To have lived in vain is not to live at all so to have not lived in vain means that a person's life and experiences had value.