You played OP build so easy for your to say.
As much as I can relate to this, having played absolute glass-cannon builds in the past, your survivability is ultimately down to your build choices. There's only so much you can do with shit abilities, and that's one of the biggest issues PoE2 currently has. Chaos DoT builds, Bone Damage skills and, frankly, most self-casting skills are utter trash because their damage output is just too low. Comet does about 15 times the damage of an Eye of Winter projectile, and about 8x the damage of an Ice Nova. ED at gem level 19 has about 220 base damage per second, which is just not enough to take down enemies in higher level maps (Comet's base damage is ~1.1k at the same level, for comparison).
Fundamentally, there's no way to fixing your issue, you will have to take hits and the only way to not get hit is to either avoid getting hit through skill, or higher damage. That's a choice you made by playing a Damage over Time build, enemies won't die quickly. So you can either try and increase your damage (what's your current weapon look like?) or figure out a way to kite enemies better. Frostwall would be an easy choice, you could also opt into playing a Spirit Scepter in your offhand for additional Spirit, and run Enfeeble+Temporal Chains in a Blasphemy setup. Blasphemy drastically lowers Curse effectiveness though, but maybe thats a viable option for you. You could also cast Temp Chains yourself, of course. With some curse investment (maybe even a weapon swap making use of curse nodes), that could add a bunch of survivability, but curses are very expensive on mana.
One go-to defensive set up at the moment is running Mind over Matter, use Eldritch Battery, and then play the Ghostwrithe Unique Chest, which turns half your max life into ES. Costs 1 ex. This ES does not get converted to Mana with EB, giving you a sizable boost to survivability if your ES ends up depleted. I don't know if they fixed this interaction, however.
Another option would be going into block. It's not hard to find >40% block shields, and depending on your position in the tree, you could grab some of the block nodes on the Templar side of things. You'd be able to get ~60% block without issue, and that should take care of most melee enemies.
Your best bet is going down these three avenues at the same time: Increase your damage by getting a better wand (ideally a +3 or +4 chaos skill want with some spell damage and chaos damage), better EHP by switching up your defensive setup, and lowering enemy damage through curses. You won't be able to just Contagion+ED like you did in PoE1 and survive, unless you have a 10k+ ES pool.