Takes time.... definitely. And, it's okay to feel sad and insecure. That's normal. If you find yourself having a terribly difficult time . Go to the bookstore and look for books on affairs and read though them (i.e. "End of the Affair," "Not, 'Just Friends,'" etc....). This will help you understand your feelings and what happened. Also, if you need to, don't hesitate to contact a therapist and go in to talk though those feelings. That may help for now.... But time is the real healer....
Hang in there.
There is no arriving, ever. It is all a continual becoming.