Is it strange that since I've done bad things I think I deserve it when bad things happen to me.
That sounds kinda normal. What sort of bad things did you do?
I've ruined my friend's life by telling his secret to someone else.
What you're experiencing is karma, so if you believe it it's a trade off cycle. I hope you can break the cycle eventually so only good things happen, you don't deserve bad things to happen to you.
I can't accept this answer, so I will keep on doing bad things with the hope that all my bad things won't be returned to me.
You shouldn't just go around with a plan to do bad things. Try making an effort to do the right thing in life, and you might not feel so much guilt.