I just wondered how other people deal with negative thoughts and constant comparisons to other people your age?

I've recently discovered all of my old university flatmates are engaged or in relationships and own their own properties. I do try and stay positive - I have a good job and friendships, and have saved a mortgage deposit (am living with family until I get an offer accepted, which personally I'm okay with as we get on) - but I often feel like a failure. I worry that people think less of me because I'm 'behind' in life, although I am trying my best. It's just hard to stay positive some times...