Ham is cured in tons of salt & preservatives so it's safe for quite a while. You'll know when it's bad -it will have a slimy iridescant appearance, or just plain smell bad. Or turn a funky shade or grey - but that's only after it's sat for a LONG time! (and even then my mom has been known to scrape off the slime & fry it up!)
We use ham leftovers for:
quiche
omelettes
mac & cheese with ham in it
potato cheddar soup (even from a can) with ham added
cheesey potatoes with ham (again box mix cheese potatoes works well!)