When praying, my past sins come to mind. Does this mean I am unworthy to pray?
No. God wants us to come to Him in humility and confess our sins to Him and then repent-turn away-from our sins. He does not want us to change and perfect ourselves and then go to Him. He wants us to go to Him so that He can help us change. The Bible says, “Let us then approach the throne of grace with confidence, so that we may receive mercy and find grace to help us in our time of need” (Hebrews 4:16).
You also need to realize that there is an enemy at work against you. When you go before the Lord, Satan wants you to run and hide because of your unworthiness. He will “help” you to remember all of your inadequacies so that you will not approach the Lord. You need to push through his lies and confidently approach the throne of grace, knowing that the Lord eagerly awaits your time with Him.