I have both pistols and my vote goes to the HK.
You need to rent or borrow both guns, shoot a good number of rounds in each and decide which one is better for you. Better might mean one is more ergonomic or more accurate or whatever. It is up to you what you "feel" is better.
Note the differences in the functions of the controls - the HK can be carried cocked and locked. Parts can be replaced to make it to left-handed or ambidextrous. It can be made DAO, decock only (no safety), etc. Refer to the HK website for all the possible combinations. On the other hand, the Beretta 96 has a slide-mounted ambi safety (Decock/Safe and Fire positions). You can't carry cocked and locked.
The slide action on the Beretta is a lot smoother, described by many as being as if on roller bearings. It's true. The HK slide has a little bit more looseness in the fit, but that makes it more reliable under a variety or conditions (extreme cold or dirt/sand/gunk).
Unless you get the Brigadier model, the sights on the Beretta are fixed, not dovetailed like the HK USP. That is not really a problem since it is possible to send out the slide to get tritium inserts placed in the front sight.
Warranty-wise (hopefully you won't need it), lifetime for HK, 3 years for Beretta.
When I switch from the 96 to the USP during shooting practice, the difference between the two is obvious. The USP's fit in my hand, its pointability and my accuracy are a lot better, hence my recommendation.
My 2 cents.