Many great saints, for example Jesus, have died violent deaths. Why is it so?

Sri Sri Ravi Shankar:

Lord Krishna has said this in the Bhagavad Gita, ‘Kleśo 'dhikataras teshām avyaktāsakta-cetasām avyaktā hi gatir dukham dehavadbhir avāpyate’ (Chapter 12 Verse 5)

If one worships only the un-manifest aspect of theBrahman (Absolute or Godhead) that brings a lot of sorrow. 
If you observe, the lives of Moses, Jesus and Prophet Mohammed were full of difficulties. The lineage of Guru Nanak also faced similar difficulties. It was because they ignored Saguna Brahman (The Absolute with qualities) and worshipped only Nirguna Brahman (the supreme reality without form, quality, attribute).

It is very interesting.

That is why it has been said, ‘Avidyaya mrityam tirtha vidyaya amritam snute’ . Take both Saguna and Nirguna with you. 
Vyakta (manifest) and Avyakta (un-manifest) are both needed. ‘Ishwaro Gururatmeti Murti bheda Vibhagine, Vyomavad vyapta dehaya Dakshinamurataye namah – Guru, Self-realization and God are all needed. If we take all of them along in life, we will be happy both in this world and the next.