Eliminate noise from IR sensor
The ultimate problem/mistake here which makes noise such as issue is the use of an always-on IR LED as the source.

If you want to build something like this which actually works, then you should modulate the LED at a frequency many times faster than a hearbeat, and use a demodulating detection circuit which measures only the desired signal.

The most robust form of this would be a synchronous detector or Lock-In Amplifier.  Essentially what you do is have your MCU turn on the IR LED, measure the received level, then turn off the IR LED, measure the received level again, and subtract.  Repeat this many times and filter (or at least average) the difference to produce your output, though be sure not to average so much that you filter out the desired heartbeat. Or you can do this in the circuitry rather than software domain.

Since there's no meaningful delay to want to measure here and there are unlikely to be in-band interference sources, it's also possible to use a band-pass filter to pass only a stable IR LED modulating frequency, amplify that, and then measure the amplitude - with care to circuit design this may give greater dynamic range.   

Typically IR remote controls work this way (often with a frequency around 38 KHz), but the output is interpreted as simply on/off, while IR distance sensors may give an analog output which varies with the strength of the synchronous reflection.

Normally the goal of something like this is to actually measure the heartbeat frequency (or even measure blood properties).  To detect the presence of a finger (vs some inanimate near reflection), you may have to first measure a heartbeat frequency and then determine if it is stable enough to be a biological source.  Or you may more simply be able to build something that decides the modulation-frequency reflection is "strong enough" to probably indicate that a finger (or at least something) is close, and turn on the crude presence indicator LED.