So, it's generally accepted that D-class personnel are death row prisonners. And that works perfectly for USA and any country, where death penalty is used… but what about Europe?
I started thinking about it and that's what I came up with:

a) wherever potential D-class personnel aren't easily available, the Foundation could 'import' them from elsewhere (USA etc.),
b) the Foundation could just snatch selected people from the streets (selection based on how easy would it be to cover up the disappearence or for it to go completely unnoticed). Admittedly, this may nor sit well with many people's head cannons.

Honestly, I find the first option more probable. Staying with Europe as an example, sure, they may have less D-class to run tests with but also less anomalies to be tested. This part of the world is dominated by GOC, so the Foundation can only contain a few objects from time to time.
Perhaps they'd also use D-class longer before getting rid of them - three months isntead of one, maybe shorter, as it could be potentially dangerous to keep them for so long.

So, what do you think? Where do D-class come from and how are they 'distributed' in parts of the world, where there could be shortage of them?

I think that maybe they would use prisoners serving a life sentence. There's the same reasons (I presume) for using death row inmates: they are eager to get out, it's easy to cover up their death (Say they died in a riot, fight, suicide, etc.), and people weren't expecting them to leave the prison anyway.

Not anymore, actually, at least not on the mainsite (can't speak for the outer fandom). While some people hold on to that view, it's certainly not the only one, and I'm fairly certain it's not even the most common one.
The one I hear the most says that the D-Class consists of homeless, refugees, or displaced persons (or any combination thereof). And well, not to be excruciatingly dark, but if that is the case, European branches would not find themselves lacking in personnel.

Not anymore, actually, at least not on the mainsite (can't speak for the outer fandom). While some people hold on to that view, it's certainly not the only one, and I'm fairly certain it's not even the most common one.

It's definitely still the most common view in the outer fandom. To the point that the old-hand authors that have moved away from the view, will find themselves today at odds with the world's view of the Foundation at large.

(I know, I've used the criminal line before, and gotten attacked for it, despite everyone newer to the site not seeing the problem—except for the clear numbers issue.)

I really don't like the idea of the Foundation using refugees as D-class because it seems unnecessarily cruel. My headcanon is that the Foundation uses death row/life sentence prisoners, then prisoners convicted of serious crimes, then refugees as a last resort only.
For those countries without death penalties the Foundation most likely uses serious-offence prisoners or ships them in from somewhere else.

I really don't like the idea of the Foundation using refugees as D-class because it seems unnecessarily cruel.

It seems to be the point - either the Foundation follows some kind of moral code and only uses people who are already sentenced to death as d-class or they don't care. I feel that for the Foundation it doesn't matter, who are they using as d-class, however it is a really repulsing thought. Afterall, we want to see the Foundation as the 'good guys' in some subtle, basic way. They screen us from anomalies for our good, right? If not, they wouldn't be any better than Chaos Insurgency, though satisfied with power over populus minds rather than the physicial kind.
Like, O-5 get to decide what is the line for the norm. Whether we like it or not, that must give satisfying sense of control, dominance.
That's why I WANT the Foundation to use only death row inmates as d-class, even if it isn't the most logical or economical option (and the Foundation is all about minimising costs of effective containment) - so that they remain positive and don't turn into morbid, horrifing organisation (though, once again, power over minds, with amnestics, memetic hazards and all).

The PRC executes about 2000 people per year on average, more than all other nations on Earth put together. Furthermore they execute for crimes that we don't consider capital crimes in the West (like fraud and drug possession) and they execute for inchoate offenses (intent to commit crime when no crime actually took place). If China is actually commiting them to D-class instead, that's probably more than enough for both Asian and European facilities.

Thing is: Why do D-Classes necessarily need to test SCPs in countries where they were originally discovered/contained? The United States is home to a) a large and increasing prison population, b) easily the largest producer/discoverer/whatever of anomalous items and people, and (very important) c) the location of the Foundation's most and largest SCP containment sites. Barring large, dangerous, and immovable objects (I would wager a minority) I would speculate that a large number are transported from other countries to the U.S. for containment and testing.

It'd be easier to transport anomalous items, species, and even humanoids by plane, train, or cargo boat (in addition to armored transports) and getting them to heavily-armed containment sites than transporting individuals just to be disposable, where they could attempt escape or would require at least some regular surveillance. This would make sense, if you considered that (going by posted articles alone) some smaller countries may not have sites or areas for anything other than specific, notable objects and events. While there may be some possibility of containment breach, we should remember that necessary risks need to be taken, even for just maintaining the Foundation's bottom dollar.