Hi Vivyan.
Although others have already pointed out that in this example you'll be better off using simultaneous voices, I'll answer your original question by saying that Lilypond allows you to modify the length of a note. For example: e2.*1/3 will show a dotted half-note while occupying one third of that duration, meaning it will take the same space as a quarter note.
This being said, I have to emphasize that I would not advise you engrave this measure in this way, and use different voices instead.
I hope you find that useful,
Stéfano