Wow corrosion city its a wonder that valve lasted as long as it did.
Anyhow by the looks of it that valve isn't worth saving. If it looked better I would advise trying to tighten the packing nut but in that state of disrepair it probably would cause more problems.
You have two options:
1. Desolder the valve and solder a new ball valve in its place.
2. Desolder the existing valve off and install a compression fitting valve.
The reason I say desolder on both counts is because you really don't have much pipe from the T to the valve. If you did cut you would need to cut it right at the valve and even then you'd be pushing it to use a compression fitting since a certain amount of pipe must be inside the valve.
I recommend 1 of course since its the most leakproof (no struggling with compression fittings) and most professional. I personally have never used a compression fitting on anything over 3/8" anything over that I sweat it.
In any case be sure to sand the pipe until you get down to clean copper where the joints will be whether you choose option 1 or 2.
As for the tight space you can buy a tiny piece of fabric thats flameproof (I forget what its called) to prevent the torch from scorching the wall.
As for soldering there really is nothing to it as long as you take your time and go slow the first time around.
Be sure to remove the handle from the valve so you don't scorch it with the torch also make sure its in its open position.
Sand the ends of the pipes, using a 1/2" wire brush (from the plumbing section) clean out the inside of the valve fittings, apply flux, insert the parts, heat them up with the torch, remove the torch and touch the solder to the joint if it doesn't melt keep heating, when the pipes are up to temperature apply the solder all around the joint. Wipe excess solder away with a damp rag while the solder is still molten.
Wait for the pipes to cool or wrap a damp rag around the joints until they stop sizzling. Make sure that the pipes are cool enough to touch before turning the water back on you don't want thermal shock.
I don't see how flex pipe would help the plain 1/2" copper pipe there is fine. If you really want flexability you could have used braided steel from the faucet to the supply line.