deleted camera app on rooted htc m8 kitkat
Just flash the stock RUU. Depending on your CID (Carrier ID), go here to find the RUU  appropriate for your phone's CID. 

To check your CID, boot in bootloader (Fastboot) and tape fastboot getvar cid or fastboot oem readcid. You'll get something like HTC_044 then go here to find from which carrier it belongs.

Flashing the RUU will clear your phone storage, you'll lose all data (photos, apps, videos, etc).