Gareth Thomas, professional rugby's only openly gay player, is talking about prejudice. "People don't even think – they just say it automatically because it's been bred in them," he says, his vowels elongated by his soft, Bridgend drawl. "A lot of them don't even know what they're talking about. They're just sayin' it because everybody says it."

He could be talking about the homophobic chants he endured during a game at Castleford last year, but he's not. He's talking about the antipathies that exist between the two codes of rugby. Thomas, who has 100 caps for Wales's union side and captained them at the last World Cup, is approaching his second season of rugby league – this month, making his international debut – and some of his teammates hold some pretty unreconstructed views about the 15-man game.

About being gay, meanwhile, his teammates have given him no trouble at all. In fact, since Thomas came out publicly in December last year, the entire rugby community has embraced him with a love and affection – that one-off incident at Castleford notwithstanding – that has set a benchmark, and laid down a challenge, for the rest of the sporting world.

It has been a dramatic turnaround for one of Wales's greatest sporting icons, who a couple of years ago was so weighed down with the fear and shame of his hidden sexuality that he was on the brink of suicide. Thomas, who had been playing rugby for Wales for more than a decade, was renowned for being – in a famously macho sport – one of the hardest, most aggressive men on the pitch. Privately, however, he was in turmoil, ashamed of his homosexual feelings, which would manifest themselves in illicit encounters in Soho bars, and horrified by the act of cheating on his unknowing wife, who he continued to love deeply. His story is so compelling, and ultimately uplifting, that Mickey Rourke is already working on the film of it.

We've met at the hotel where the 36-year-old has been living, in a small village outside Wrexham, since he switched codes to play for the Crusaders in March this year. Thomas's marriage ended in 2006, the year he told first his wife Jemma, and then his teammates, that he was gay. Jemma, still a good friend, now lives in Spain with her mother. The hotel's receptionist, Pauline, has already told me, with quasi-maternal pride, that he is a lovely man. "Some people say it's sad living in a hotel," Thomas offers, "but I'd rather be living in an hotel than living in an house on my own."

There is, categorically, nothing sad about Thomas. It has, in some senses, been an exhausting year – he had to handle the aftermath of his coming out while playing two rugby seasons back to back, because the league season follows the union one – and he shifts his 6ft 3in, 16st frame around on his wooden chair, stretching out his tired muscles while we talk. But by this stage of their career, rugby players' faces normally have the beaten, craggy look of Mount Rushmore. Thomas's, on the other hand, is positively glowing.

"I know I'm still at the early stages of coming out, so this big happy drug I'm on will probably wear off at some stage," he beams, "but right now when I'm happy I want people to know I'm happy, and the reason I'm happy. I didn't go through what I went through – and put everyone else through it, too – to be unhappy." Log on to Twitter, and you'll see that his tweets bear him out. He goes to bed every night urging his followers to "dream big" and greets each new day with the kind of positivism usually associated with Disney characters: "Morning peeps.My fav day is here.Monday!!"

At a time when the notion of sporting role models is degraded by endless stories of philandering footballers, no one has assumed the mantle with as much dedication or enthusiasm as Thomas. Since coming out, he has seen it as his duty to give interviews, to share his personal experiences, to be a figure of hope for those afraid to admit their sexuality, and to surprise, educate and challenge those – particularly in the macho world of team sport – who still struggle with prejudice.

On Twitter he has become a virtual agony uncle for many men and women dealing with issues of homosexuality. "When I started doing Twitter, I realised there were so many people following me who were going through the same thing I was going through," he says. "A lot of people were asking me questions, even though I was saying: 'Look, I'm not qualified– all I can tell you is what's happened in my life.'" In some cases, gay men and women have been getting in touch to tell him how his online presence – or sometimes just reading about his story – has given them the courage to come out. And his community of followers supports him in turn if he's ever feeling lonely or down in his hotel room.

He's not afraid to take a public stand, either. When the journalist AA Gill called Clare Balding a "dyke on a bike", he immediately pledged her his support (although, he laughs quietly, he did think the rhyme, if not the sentiment, was quite funny). "A lot of people in London, in a larger gay community, to them it's 'whatever', because they already feel safe. But I try and think of the most vulnerable person and how it will affect them – the gay man in a small village, where all the people are in the pub are laughing at it. What message is it going to send to him?"

It's a difficult line to draw, I suggest. His former Welsh teammate, Jonathan Thomas, caused upset this year when he joked about a gay Welsh referee on Twitter. Another Wales player, Ian Evans, had posted: "Legs and ass are in bits, can't move" and Jonathan Thomas had replied: "U gotta stop hanging round with Nigel Owens!'' How did Gareth Thomas respond to that? "There's that line between insult and banter, and people need to be educated about it," he says, adding that, having spent his life amid the racy banter of rugby dressing rooms, he knows it's crucial that people are able to laugh at themselves. "JT shouldn't have said it, but it's totally non-malicious. The great thing was that he learnt from it. He publicly apologised, and he knows now."

And then there's the prospect of becoming a gay icon, thanks to Hollywood. Thomas had already had a couple of offers to commit his life to celluloid when Mickey Rourke, a long-time rugby fan, rang. Thomas was in his hotel room – "Hanging out my bedroom window cos I can't get a signal" – and assumed it was one of his teammates putting on an accent. "I thought: 'Fair play, the boys are going to some serious trouble here to wind me up – they've got hold of an American mobile phone somehow.'" Blasé, he went along with the joke and waited for the punchline at training the next day. No one said a word, and later that day Rourke rang again to invite Thomas out for dinner. "And I thought: 'Hang on, this dude is for real! It's Mickey Rourke on the phone to me and I'm playing it so cool!'"

Before development on the film gets underway, Thomas has to write down his memories of the hardest time in his life, when he was keeping the secret of his homosexuality from his teammates and while, at the peak of his rugby career, he was struggling to find the will to play at all. The emotions are too raw to do it alone, here in the hotel; he needs, he admits, to be surrounded by his parents and friends in Bridgend before he can attempt it. There is a long silence.

"I realise that it's going to be hard work," he says, finally. "I want it to be as real and close to the bone as possible. There are times in my life when I've wanted never to exist. There's times you don't want to go back to."

Next season, which kicks off in February, will be his last. Before he came out, he had always assumed that he would, like most retired Welsh professional players, go into coaching. Since last December, however, his options have "probably tripled", although he says he'll still miss the sporting life. "It's a tough one, because the lifestyle – the eating together, the camaraderie – that's not easy to replace. So I'd love to find the nearest thing to it." A season on Strictly Come Dancing seems all but assured.

And although he's a Welsh homeboy through and through, the new opportunities might just open up one more avenue: meeting a boyfriend. Thomas is currently a "contented" singleton, but that's rather through circumstance than choice. He looks out of the window towards the village and laughs.

"Wrexham? It's up there in the gay world, but it's not the biggest scene…"