If you want to play this as written then there is not actually a choice - you'd hold down the two long notes (e.g. with fingers 2 and 4) while playing the short notes 'over the top' (using the thumb for the low D, 2 and 4 for the G and B, finger 5 for the high D). However, both of the long notes are repeated in the shorter notes/melody, so you'd briefly take your finger off and replace it to make them audible as part of the run.
Is this accordion notation? A sustain pedal wouldn't really help as it keeps all the notes going, not just those two.