I found out the pay of everyone in my company
Is that a good thing? What did you do when you found out about everyone's pay?
I saw that everyone's pay is above mine. I deserve the same pay, I was promised a raise on my next pay rise!
You shouldn't have been prying into what everyone else makes, as that is their business and not yours.  However, now that you've made this discover, you should speak to your boss about what you've learned and try getting your raise.  However, if no one knows that you have seen confidential information, don't bring it up, just say that you've heard about pay differences.
I feel resentful. I should have access to everyone's pay too, so I can know whether I am underpaid or not!
It's true that there are problems with keeping pay information secret, as it can lead to unfair compensation in the workplace.  However, I would concentrate on the fact that you are not being paid fairly for your own work, and this is something that you can bring up with management or with HR.