I agree with a bit of what has already been said, mostly around helping him get a job, as that would be a more positive impact to his ability to support himself and his family.
The blind spot here is that for many, including myself, video games are an escape from reality, whatever it is. Is the optics of being unemployed and being gifted a gaming PC poor to his significant other? Maybe, but that's not your place to worry. Technology and games play a massive role in the mental welfare of many people today, and can help get them through a tough time, regardless of what it is.
There is not a perfect answer here, but I'll say this - giving your friend a PC because you recognize he otherwise cannot afford one himself is not some sort of crime, and you seem like you have a decent bit of self awareness. As with anything, it's not about what you say or do, but how you say it or go about it. You know your friend best, so only you have the right answer here.