As frustrating as it is, this is the way it works. Everyone is racing to publish their data first. It happened to me and it happened to my supervisor and it can be really frustrating.
The good news is that it doesn't stop you writing your thesis, what I would probalby do is to include their reference in your discussion as backing up the data that you have found- despite everything it is always nice to know you were right!
As for publications the option is to try find SOMETHING you have done that they didn't and use that as your angle to publish, so you show the same data but you might have looked at a very slightly different aspect of the work - I would examine their paper very closely and look for imperfections you can exploit.
If all that fails, it really isn't the end of the world - write your thesis and find a job with someone who publishes loads and learn from the experience.
Main thing is to get the thesis done