When we see a beautiful woman, we can turn it into something positive by appreciating the beauty of Hashem. This is the only long-term solution which will avoid depression or other problems. Hashem is the source of all beauty, and we can connect with that beauty both in this world through holy ways and in the next world. If you feel a burning passion in you, you can use that passion to serve Hashem immediately in whatever way you feel. This has sometimes worked for me.
There's a Gemorah somewhere about one of our sages who saw a beautiful woman while on the Har Habayis and made a bracha to Hashem over her beauty. Maybe the Gemorah there is telling us it was on the Har Habayis to teach us that he was already in a "Har Habayis" state of mind (because on the Har Habayis you need to be in a certain frame of mind in awe of Hashem).
Addicts tend to think they need a beautiful woman to be happy. But if you had all your visual memories of women erased and then were marooned on a desert island with a kind wife who isn't attractive, you'd probably manage to have a happy relationship with her.
The problem is not that we lack what we need. The problem is that the other possibilities we see kill us. Both single and married people are constantly bombarded day after day seeing women (or pictures of women) whom we're attracted to but we can't have. Everywhere we go. A walk to the supermarket, to shul, at a wedding. And you never know when another one will pop up. Sometimes they're fleeting passersby, and sometimes they're your new neighbor who you'll see every day.
When we see something we want but can't have, that feels very uncomfortable. Kids will tantrum. Adults have learned other ways to deal with not getting what they want, sometimes constructive ways, and sometimes destructive ways.
If we don't have the right self-awareness, Hashkafos, and methods to deal with all the feelings this generates, our lives are going to be miserable. If we're single, we'll be searching for the one woman who we think will take our mind off all these other women (and if we eventually think we found her, that may work till after Sheva Brochos). If we're married, we'll be either frustrated, angry, sad, maybe wondering why we married plain Jane when we perhaps could have married a more attractive woman, maybe wondering why the girl who seemed attractive during dating seems unattractive now.