Damaged rim, can it be fixed?
If the damaged wheel comes with a cheap to midrange bicycle, it should not be fixed for economical purposes. What you should do is to buy a new matching wheel. Otherwise the cost of replacement rim, new spokes and nipples plus manual labor of a wheel builder may easily overshadow the cost of a complete factory-built wheel.

If you are really determined to save the most of the wheel, you should look for a matching replacement rim. Fixing the current rim is unrealistic as there is no ready equipment for that, and DYI would most likely make an unbalanced wheel or unreliable fix.

Sad things like this happen. I was backpacking once and discovered that my rear rim cracked exactly at the midway point of my trip. Managed to get back home safely and made this picture:



It was extra sad because I changed a faulty hub on the same wheel barely several months before that, and the first hub only did 40 km.