What should someone do if he/she found a very similar published paper to his/her thesis work?
There is no question about how to tell your advisor. Just do it. He or she will help you decide what to do. If the work is independent and the other paper is obscure enough you might have no problem with your degree, but might not be able to publish this work as is.

Not to tell your advisor would be a serious breach. 

However, if it is work that you should have known about (literature search, etc), then you may be unable to use it at all and have to revise your research plan. An extension of the work might be one option. 

At the doctoral level the answer would be a bit different, leaning more toward abandonment of the work, but, depending on your advisor and any committee involved, you may be ok. 

I'll note here as I have other places, that parallel work (and overlapping work) is very common, especially in fields with a lot of research activity. Your advisor will know about this, I'm sure. 

The age of the other work is a bit of a problem, of course, but it can reasonably happen this way in certain cases.