Pharaoh was ready to repent only when he saw death in front of eyes. Send me back. Whoever died committing any other major sins, Allah may forgive him or punish him for what he did. And if he is forgiven, he will be in Al-Jannah. Finally, repentance should be a continuous action a Muslim should practice everyday and every moment in his life.
Some people think repentance applies only if one committed a sin and feels sorry about it.
Some sins we commit but we are not aware of them, such as sins of intention of doing a righteous act i.e. Riyaa. You perform a righteous act to show off which is called riyaa and the person is not aware of it. Sometimes, we speak some wrong things, or back-bite without realizing it. It is written as a sin against us. From this point, we realize the importance of practicing Taubah and we should seek Allah's forgiveness in our every day life seeking to die in a state of repentance.