I'm losing muscle mass in my 40's
Most of my life I have been an athlete of some sort. I enjoyed sports at a kid and played a lot of them. In my adult like as in after college when I had to get a job and make my own way in life I didn't really play that many sports anymore but I always had a gym membership. It was always a big part of my life and I was always at least to some degree ripped.
I recall when I was in my late 20's and at a company event outdoors and we were in casual wear and I had a vest/sleeveless/wife-beater shirt on and one of my work colleagues remarked something along the lines of "damn dude, you are friggin jacked! That made me feel nice to hear that, because at that point while all of them were running home after work or heading to the pub I was clocking out and heading straight to the gym with my supplement bag for years at that point.
I've always been into maintaining a good muscular frame but as I have gotten older, I have started to find that attempting to maintain that physique becomes increasingly difficult: You are much more susceptible to injury and I started to find myself straining myself or having rogue seriously sore muscle issues and even spasms at points. In the past 2 years I decided that it was time for a change so while I didn't walk away on personal fitness, I did transition to a mostly cardio diet with just a bit of weights in there.
In the past I would hit the weights almost every single day and almost never do any cardio other than the elevated heart rate that you get from lifting. These days, I do 5 solid days of pretty hard cardio and maybe 2 days in the gym with what is a high rep, low weight workout just to remind my chest and back that I'm not done with them yet.
I knew this would happen and I am just trying to be ok with it but as it turns out, it isn't just me. This is true for everyone

src
I looked up a number of studies about this and not just some YouTuber who is clearly using steroids and is trying to sell some sort of bogus supplement. All of the studies from various places around the world say that you peak around the age of 30 and by age 40 you begin a rapid and rather unstoppable loss of muscle that can only be slowed down, not stopped. The only way around this is to be like Dwayne Johnson otherwise known as "The Rock" and be roided to the gills.

src
This man publicly claims to not be on any PED's and just has a very rigorous workout regime. He is also the butt of almost all of the jokes in the fitness industry and with people who lift clean. We all know he is lying but we also understand that he has to say this in order to protect his image. I personally would have a lot more respect for him if he were to come clean.
I respect Arnold Schwarzenegger for coming clean in his 60's about his steroid use throughout his life but when he said it I wasn't surprised. Everyone could tell this was the case. He now claims that he has stopped using and has stopped for quite some time. I don't think anyone with above normal brain function thought even for a minute that this guy was not using banned substances. It's obvious..
To be honest with you, I probably WOULD take these substances if I had access the likes of which Dwayne Johnson and other celebrities do, but all you have to do is have a quick glance at the Liver King's "script bill" that leaked to understand why this is well out of the scope of most people's existence. In leaked emails it was discovered that the cocktail of substances Liver King was taking was costing him $11,000 a month. This is well over the amount of money that I spend on everything in my life per month.
When I look in the mirror and even worse when I compare to pictures from as little as 3 years ago, the loss in muscle mass is evident and sometimes it makes me sad. But then I try to look at the positives instead. 3 years ago I couldn't run 1 kilometer in a row at a medium pace without being in pain and seriously needing to stop. Yesterday I did a 10 kilometer jog with a 3 km cooldown walk and it barely affected me in the sense that today (the day after) I feel fine with no adverse muscle reaction to speak of. This is true on all the days that I do this and doing a 5k on days where I don't have much time, it's like child's play, it isn't even difficult to me.
I think that as you get older it is likely a lot more important to look after your cardiovascular health than to look ripped and I truly believe that bodybuilding is a young man's game.
I still go to the gym for a full body workout but admittedly, the stacks I am pushing up and pulling down are around 50% what they used to be. The other day I tried to do a shoulder press at 180lbs, which used to be my warm up weight, and I couldn't even lift it once. I stepped it back to 100 and the next day I was seriously hurting from trying.
So if you are in the same boat, if you are experiencing muscle loss as you get older, just know that it is completely normal and unless you have the Rock's resources, this is something that is definitely going to happen to you.

src
Maybe it is just ok for you to accept that you cannot realistically maintain the body of a 30 year old and instead seek to climb to new heights in something else that you never did before. That's where I am now, and while I am still a bit disappointed when I look in the mirror, I think this is normal for anyone that is getting older. We all get older, I suppose our own happiness can kind of depend on how we choose to handle that.
In my own particular situation I think perhaps it is a good thing I never tried to Joey Swole bulk because a lot of those older guys end up with man boobs from the loss of pecs and for every older guy that used to be huge that I have seen, that is something that is definitely very noticeable and very ugly.
In the meantime I have a half marathon coming up next month and I am well on my way to being completely ready to conquer that challenge.