I began handgun shooting [on my own] with a .40. It caused me to develop a horrible flinch that took years [of sporadic, like 4 trips a year] of trips to the range to work out, AFTER I gave up on it.
I bought a .45 and it felt better. I bought a 9mm and it also felt better.
Everyone's experiences are subjective. Your experiences will vary from mine.
My experiences make the .40 the LEAST comfortable to shoot of the 3 calibers you have listed.
The 9mm has a crisp 'snap' or 'pop' to it, with a sharp [but not too strong] recoil impulse that is easy to control.
The .45acp has a more booming 'bang' or 'push' to it, with a longer and smoother, but more powerful, recoil impulse that is also relatively easy to control.
I'd compare the 9mm to a high-revving engine making power, and a .45acp to a [gasoline powered] pickup making power [no, not a diesel: that's more of a .44mag thing]. They do it differently, and both will get you from a-to-b.
Now the .40S&W's recoil impulse is the best or worst of both worlds for me. It has a more aggressive 'snap' or 'pop' than the 9mm, with almost the same amount of push as the .45acp.
I find the .40 harder to get back onto target quickly than 9mm or .45acp for me.
After working with .22lr, 9mm, .357mag, .44mag and .45acp [honestly, I like ALL of these recoils better than .40] I FINALLY bought another .40 handgun.
Now I can control it reliably, and hit the target where I aim at. It only took me 10 years.
If you haven't fired all three, read posts like this, compare them to your own experience level, and compare all of the above to the availability of ammunition in those calibers where you live.
I will NOT recommend one over the other three without knowing you well. All will save your life if you learn to use them well. None will do the job if you don't learn to use them well. I know which of those three calibers I'd use for home defense. I know which caliber I'd let someone who didn't have much experience shoot. Where I am living 10 rounds is my max, so that helps me make decisions also.
But you have to decide what will fit YOUR needs best. Just be aware of the differences in how they feel in your hands.
Love is not the dying moan of a distant violin. Its the triumphant twang of a bedspring.