Feelings are connected to one's internal dialog (your thoughts, whether or not you ruminate/believe what you're thinking)
It is normal to have the desire to do enjoyable things. At the time of your friend's disclosure, you may have interpreted the situation as something that you won't be doing anytime soon (or something as fun) As a result, you may have felt resentment (not necessarily towards your friend, but at your own predicament) It is natural to also feel envy. People are social and competitive beings. It would be more unnatural not to strive for pleasant and fun things in your life.
Another cause for your reaction (may be subconscious) and it may be related to the fact that you've not yet discovered how you want to live your life fully and freely.
The good news is that thoughts and feelings can be changed. There are different tools that allow you to do so depending on what you're open to trying. Instead of comparing your situation to that of others, try to do those things that make you feel good that you're able to do anytime you want. These do not have to be costly and may be even done at home. You know what makes you feel relaxed, excited and full of energy.
Thoughts can be changed by autosuggestion, hypnotherapy, cognitive behavioral therapy or even bibliotherapy/workbooks. I've listed some books below that have made quite an impression on me and I find helpful and recommend to others.
Today We Are Rich
Change Your Thoughts Meditation CD: Do the Tao Now!
Wayne W. Dyer
The Happiness Workbook: Take Control of Your Happiness - Dozens of Proven Ways to be Happier