I think I ruined my friends relationship because I told him a  secret that I knew.
Why do you think that's the case?
They used to be really close now they hang out together much less.
It is rude to tell your friends secret to someone else. You should not pressure people and make things weird between them because you have a big mouth. You might not be trusted in the future with secrets.
I bet they are going to break up anyway.
That may be the case, but I don't think you should be happy that you helped end your friend's relationship. Instead of spilling secrets, I think you should probably just be supportive of whatever support your friend needs. This is a good chance for you to show how great of a friend you can be.