True, one may be trying to hard at the wrong thing at least. You do indeed have to "try hard", but not at being desperate (not that I am implying anyone in here has been ). What you need to try hard to do is make yourself into a high quality person. That is true for lots of reasons, many people will cite the most important one as being how you view yourself. Humans are self esteem detectors, and nobody wants to be with someone who thinks low of themselves. People want to be with people who they think are great and can make their life and them great too!
So its a vicious bit of a cycle: you are unhappy because you have no lovelife and you have no lovelife because you are unhappy. Slip a tangent in there, and find happiness first, I think it is the only way. If people see that you are passionate about the things in yourlife, that you are an admirable person in many areas of life then things will come.
Visualizing then pretending then actually trying to become a happier more confident you can get you where you want as well. Example: for me I literally think about what I want my Looks, value, emotional connections, goals, authenticity, and self worth to be and try to fit that standard with blinders on to if others are looking or not. Dont give up, it will just make you more unhappy... probably. Good luck