So you've done something that you aren't proud of. You're definitely not alone. You may feel like you're not worthy of seeking help, but you most definitely are.
Everyone deserves the right to live, no matter how badly we might mess up. We promise you that suicide won't solve any problem in the world, even if it is a problem you've created. You have a chance to make the situation right, no matter how unfixable it seems. Even if you are incapable of fixing what happened, life goes on, and I guarantee you someone else in the world, in all time, has made a similar or worse mistake.
You are so worthy of redemption, just like everyone else. Nobody is perfect. We've all done things we aren't proud of. You've already done the hardest part: you've realized who's at fault. That takes courage. Now you're in the best position to make your wrongs right. You're halfway there.
If it's something you're keeping a secret, and telling someone is the only way to get treatment, then please do so. There are text and call hotlines that are completely anonymous, and not only for suicide prevention.
There are also safe places to confess. Try telling someone you trust, or if there isn't anyone, talk to a mental health specialist. Telling someone eases the burden of your guilt tremendously.