Yes, both versions are grammatically correct; but the phrasing is a little unusual – I'm not sure I've ever heard anyone say "I'll die if I do that!".
Though you might (possibly) hear "It would kill me to do that"; or simply "that would kill me".
Is it a translation?
- For Teachers