The 'Partenopei' dropped two points in a goalless draw at AC Milan on Sunday, while the 'Bianconeri' extended their advantage at the top by beating Sampdoria 3-0 in Turin.
And the result "leaves a bitter taste in our mouths", according to Hamsik, but he insists they must believe that they can catch the league leaders.
"There are still 18 points up for grabs, and we will fight to the end," said the midfielder. "The gap between us and Juventus is getting big, but we must keep believing until it's no longer mathematically possible.
"The draw against Milan leaves a bitter taste in our mouths, especially given how many chances we made compared to the 'Rossoneri'.
"We just have to think about our next game against Udinese. We must forget what happened at San Siro and focus on our next objective. I also want to thank all the 'Azzurri' fans at San Siro."