You should immediately call the police and let them know what's going on. Try to not go anywhere or be anywhere alone. Call your closest and most trustworthy family members of friends you know. Keep all threatening text messages, phone calls and emails for your records.
Make sure you report this to the authorities right away so they can investigate this fully. Take all precautions and make sure you are safe. Advise your family, friends and co-workers what is happening also.