Speaking at the Luton Magistrates’ Court, Peter Rombough, 22, admitted that he travelled 93 miles to the family home of Samantha Womack.
He entered the grounds and hand-delivered a love letter to the Ronnie Mitchell actress.
Just days later, in the early hours of 4 September 2015, the 42-year-old EastEnders star spotted the light from his mobile phone.
Her husband went outside to confront the obsessed fan, who was camping outside the house.
The court heard that Rombough posted an apology to the couple on Twitter, saying: “I never meant to cause upset.
“I am very sorry.”
The Ditchingham local has since pleaded guilty to one charge of stalking.
Nicole Burton, who was acting as Rombough’s defence lawyer, said: “A psychiatric team in Norfolk will be the people responsible for supervising his treatment.”
Rombough has since been bailed and his sentence hearing transferred to Great Yarmouth.
Speaking in an impact statement, Samantha Womack said that, while she was distressed by the ordeal, she hopes that Rombough will receive the help he needs.