My question, how can I effectively avoid eating with him in a restaurant and not make him turn to be an enemy?
This is going to be a challenge. My suggestion to you is to let him know that you appreciate the offer, but you have other lunch plans. Rinse and repeat, continue telling him the same thing and eventually he will get the hint. It may be more comfortable for you to ask a friend to be your lunch buddy so you can always say you have other plans.
As far as private chats are concerned, ignore those communications with him all together or repeat the same message as above. The key to this strategy being effective is the consistent delivery of the message ( NO ).
If this behavior continues, then it is time to ask your manager how to get this guy to stop harassing you. If your manager is unable to resolve this issue, then in your case I would speak to your HR representative about what your options are.
Summary: Repeatedly state you are not interested, if that fails after some consistently, with no mixed signals. If that doesn't work ask your manager for help. If your manager cannot help you, speak to HR,.
Bottom line is you don't have to eat lunch with anyone.