Short answer: No. In order to purchase a firearm in the US you must be a resident of the state in which you are buying it, and able to prove that residency. A tourist is not a resident of the state, they are unable to purchase firearms.
It's true that the core of the Gun Control Act prohibits nonresident aliens from owning firearms, but the gun rights advocates have done their best to make swiss cheese of these regulations and there are many loopholes available to get around it.
If you travel to the US under the Visa Waiver Program the prohibition on purchasing firearms does not apply. A big chunk of Europe participates in the Visa Waiver Program, but not many countries elsewhere. If it applies to you you're lucky and you don't need to jump through any hoops to purchase firearms.
If you aren't eligible for the Visa Waiver Program, there is an exception if you have a hunting license. It can be from any state, and they can be ridiculously easy to obtain. You may also need a proof of residence with the hunting license, I don't know if that applies to all states but at least some places require it. Proof of residence fairly simple, they just want a document showing that you live in the state, like a rental agreement or contract. An AirBnb receipt might even be enough.
The most Wild West approach is to travel to an ultra gun-friendly state like Idaho, Montana, or Wyoming where private sales don't require any ID or background check whatsoever. Some sellers choose to require ID for their own protection, but many don't. You can find websites for people trading guns, and you could line up most of the transaction online and by phone before traveling there. The states I listed are sparsely populated so you might need to travel to a remote location to purchase a weapon. Those states also have sky high suicide rates on a par with impoverished African nations, so CTB there is nothing out of the ordinary.
can you somehow borrow gun from people ? well if i find someone who will lend me their gun is possible but it is probably impossible to find such person unless you have connections among gangs etc
Unlikely. Anytime someone commits suicide using a gun it will be seized as evidence for the investigation. In many states any time you loan a weapon to someone else you have to do a background check, or report it to the police. If you're a nonresident alien who's prohibited from possessing a weapon the police could then go after the person who loaned it to you.
In a state without such requirements the gun could eventually be returned to the owner once the investigation was complete. Most people would be uncomfortable with being sucked into a police investigation involving their firearm, having to wait an unknown period of time to get it back, and having to clean whatever bits of you end up on it.