Yes you can freeze ham that you get from the deli.
If I buy ham from the deli and don't eat it all at one time then I freeze the leftover deli ham for another day or a few weeks later and although it's not as fresh it's still very safe to eat and tastes good.