If you're in Canada, you would need a connection to get an illegal firearm. You won't be able to purchase one legally without a license anywhere in Canada including online. I haven't kept up with the US gun politics but, I'm sure there is a state that is still very firearms friendly. If you went there, it would probably be much more straight forward than Canada.
Shipping firearms are a whole other thing. If you break laws regarding the shipping of firearms you may well spend many years in prison. Which probably won't do anything for your will to live. Or lack thereof.
The other option is to try your luck on the dark web. You can get anything on the dark web but, again, prison time may be a possibility.