This has probably happened to many people at one time or another, but it's a little more complicated in a foreign country, though.
I can't hold out much hope for finding the items lost/stolen, especially the cash - but go to where you think you lost your wallet, and explain what happened and ask whoever's in charge about it. Report your losses also to the local police - they may be able to do some investigating that you can't do, and that may possibly help.
Since you have internet access you should get in touch with your credit card companies and report the loss. You don't want crooks accessing ATMs and draining your accounts. Also contact the authority who issued your ID and notify them of your loss.
For your passport (assuming you are a US Citizen), see this site:
https://travel.state.gov/content/travel … tolen.html
You may want to notify the US Consulate or Embassy in Lima:
https://pe.usembassy.gov/
Here is the Embassy page for US Citizen Services which includes a section for Victims of Crime and also Emergency Financial Assistance (look under Emergency Services):
https://pe.usembassy.gov/u-s-citizen-services/
Note they can help you get a replacement passport good for return travel only as well as possibly give you some money, if you can't get any from friends/relatives in the States using Western Union or other money transfer services.
It also can't hurt to try to get some help from your tour operator and/or fellow tourists.
Assuming you also have a round-trip air ticket, I'd also notify the airline and ask them what to do to ensure your flight back home can take place with no disruption (since you may not be able to show an ID or passport going out of the country).
Not to sound like I'm telling you to close the barn door after old Nellie has up and gone, but this advice holds true for most travelers in any foreign country anywhere: It's always advisable not to carry your wallet with you at all and especially not in a rear pocket. Carry small amounts of cash distributed in several front pockets. Carry only copies of your ID and for your passport, just have copies of its relevant pages with the photo/address pages and the travel visa/stamp.
Also, calm down and take some deep breaths. Go down to the hotel bar, just have several drinks (no more!) and tell them to put it on your tab. You'll get all this straightened out and although it may not be easy, this, too, will pass. And looking forward you'll have a great story to tell, and you'll even laugh about it sooner or later...