I do not have experience of having, or DH having, any sort of affair during our relationship. However, I can empathise with your needing to feel wanted and desired. For various reasons, we went through a long drought. Problems relating to health issues and then, when they were resolved, we had sort of 'lost the habit' IYKWIM.
I reached a point where I had to tell DH exactly how I was feeling and what I felt we both needed to do about it. It was so difficult, because although I had no doubts that he loved me, at that point I felt so undesirable that I almost convinced myself that he would rather be alone than to work with me to get back on track. And I knew that if he had said 'no', that would have been the end of my marriage ( as a child of a marriage which ended in a bitter divorce due to affairs, I would not have contemplated the affair route). Thankfully, DH was of a similar mind to me, but hadn't known how to approach it with me. And we worked on it together and within a few months things were great and have been ever since. The difference is though, that despite my self-doubt, which I now believe stemmed from my low self esteem due to lack of a physical relationship, I actually never doubted that he loved me or cared about me. Throughout our drought, the only thing missing really was the sex. We still laughed together, talked together, he supported me through my health issues as well as the deaths of some family I was particularly close to. I never felt let down by him in any way.
Does your DH know exactly how you feel? That you are even considering the possibility of an affair? If not, can you tell him? The thing is, that at the moment, you are feeling very fragile and therefore feel a greater than usual need for someone to confirm that you, as a person, are of value. If your DH isn't doing that, you feel worse and have a greater need etc etc etc. it's a vicious circle. And just at your lowest point, someone else comes along and makes you feel good so you then consider the affair route. But how would you feel in the morning? When you wake up in your bed with your DH and not your lover? Would you feel it was all worth it or would you feel even worse? How about if your DH found out? How would you feel about yourself then? or about the effect it may have on him or even your marriage? If you honestly feel that you would be fine with it all, then go ahead. If, otoh, you would feel even worse than you do now, you need to re-think. Personally, I would have to have that discussion with your DH first and really make it plain what you want, what his role is, what you are prepared to do to heal the break in your marriage and what the potential outcome could be, good and bad. It will be very difficult. Only you will know whether your marriage is worth it. Of course, the consequence of that discussion may be that your DH tells you the marriage is over, and you need to be prepared for that too, but if that does happen, it means you were right when you said he didn't care enough to begin with. The only difference then is that at least you all know where you stand and can begin to make plans for the future.
Good luck 