My cousin recently committed suicide by drug overdose but by the time we got to him, he was lying on the floor still conscious. He repented then died a few minutes later. Is he in heaven?
"Therefore do not go on passing judgment before the time, but wait until the Lord comes who will both bring to light the things hidden in the darkness and disclose the motives of men's hearts; and then each man's praise will come to him from God" (I Corinthians 4:5).
When you stop and think about it, there is very little that we fully know about any person. We know about many of the things the person has done in his life, but not all of them. And we are certainly not privy to his thoughts and motivations. Just think how many times someone misunderstood what you've done, said, or written and that is dealing with a single incident.
I'm glad your cousin had a chance to consider and repent of his actions before his end. Repentance is required for forgiveness of sin (II Corinthians 7:10-11). But what you and I can't answer is why. Why he committed suicide and why he changed his mind. Nor can either of us say what other issues remained in his life: resolved or unresolved. What we can know is that God is a just God and merciful God. We can pray that God has mercy on his soul, but the final decision will be up to the Judge who knows all things.
Meanwhile, we need to teach others the truth. We don't want anyone lost or teetering on the edge of the cliff of suicide or, for that matter, drug use. Preventing sin at its start is the best thing that we can do for others. "For whoever is joined with all the living, there is hope; surely a live dog is better than a dead lion" (Ecclesiastes 9:4). Your cousin has passed on and his fate is now sealed. But those of us still living have the potential of improving our lives and that is where the focus should be.