It will be a somewhat long response. Bear with me.
And how do you that it isn’t regeneration?
We see a similar idea in Ac 16. When the jailer understands what has happened he is convicted and says: “Sirs, what must I do to be saved?" Much in the same way the people respond in Ac 2:37 upon their conviction: “Brethren, what shall we do?" (Likely to be saved). The response is the same, the shock of being in the wrong standing with God. The answer in Ac 2 is repent and be baptized, and the answer in Ac 16 is believe in the Lord Jesus, then get baptized. It's also noticeable how the jailor repented after conviction: He let them go and washed their wounds. And no, regeneration did not happen at conviction, because he was not yet saved.
When the jailer awoke and saw the prison doors opened, he drew his sword and was about to kill himself, supposing that the prisoners had escaped. But Paul cried out with a loud voice, saying, “Do not harm yourself, for we are all here!” And he called for lights and rushed in, and trembling with fear he fell down before Paul and Silas, and after he brought them out, he said, “Sirs, what must I do to be saved?” They said, “Believe in the Lord Jesus, and you will be saved, you and your household.” And they spoke the word of the Lord to him together with all who were in his house. And he took them that very hour of the night and washed their wounds, and immediately he was baptized, he and all his household.
— Acts 16:27-33
Well, it can’t be what you think because that sorrow has a specific result. It leads to salvation.
That is what conviction does, leads to salvation. Not directly but through repentance, like the verse says.
For the sorrow that is according to the will of God (conviction)
produces a repentance without regret, leading to salvation ...
— 2 Corinthians 7:10
That’s actual conviction. Like in court.
Why would it be like a court? Is it legal talk Jesus shares with his apostles? Isn't it more likely about the spiritual and moral truth? He will convict the world of unbelievers to the truth about:
- Sin and it's consequences for not believing
- Righteousness being through Jesus, since he is the Messiah going to the Father
- Judgment coming, like the ruler of this world was judged.
And He, when He comes, will convict the world concerning sin and righteousness and judgment; concerning sin, because they do not believe in Me; and concerning righteousness, because I go to the Father and you no longer see Me; and concerning judgment, because the ruler of this world has been judged.
— John 16:8-11
How do you know that this didn’t happen because you had a new heart?
Because I experienced the very second my heart changed.
Did you notice the word “return”?
It does not necessarily mean the wicked, unrighteous person had a relationship with God before. It may be there has been generations of separation from God, which the wicked person is part of. Also returning to God from sinful life, does not need to refer to there once was a righteous life. It might be pointing to we all need to return from sin to God, since all are sinners from the beginning, all have strayed. We see this concept clear in the NT.
For you have been called for this purpose, since Christ also suffered for you, leaving you an example for you to follow in His steps, who committed no sin, nor was any deceit found in His mouth; and while being reviled, He did not revile in return; while suffering, He uttered no threats, but kept entrusting Himself to Him who judges righteously; and He Himself bore our sins in His body on the cross, so that we might die to sin and live to righteousness; for by His wounds you were healed. For you were continually straying like sheep, but now you have returned to the Shepherd and Guardian of your souls.
— 1 Peter 2:21-25
Even if the person once had a relationship with God it's still the same order for anyone who is lost: conviction, repentance, forgiveness/salvation.