God convicts Christians of areas of sin in our lives, and this could be considered the working of the Holy Spirit. Even Paul considered himself not to have attained perfection (Philippians 3:12) and cried out to God about his own wretchedly sinful nature. (Romans 7:24) If we judge ourselves we won't be judged. (1 Corinthians 11:31) God convicts Christians of sin in their lives and they are to continually forsake it. (1 John 1:8-10, 2:1, Galatians 6:1)
Showing a heart to seek God if anything is a sign you aren't lukewarm and desire God. For confirmation of salvation, I strongly recommend reading 1 John - that was recommended to me the first few years after I became a Christian and it really helped me. There are a lot of ways listed by which we can know we are saved in that book.
Christians are told to work out their salvation with concern (Philippians 2:12-13) to make sure they are saved. (2 Corinthians 13:5) In fact, it's when we are confident we are saved that we are in danger of falling, which is why Paul spoke of carefully disciplining himself and taking watch over himself to make sure that after preaching to others he would not be a castaway. (1 Corinthians 9:27, 10:12)
Self-examination is Biblically commanded of Christians.