Answer:
You can't!! There is no railway to Dalhousie and never has been.
There IS a station called Dalhousie Road just 10kms out of Pathankot on the narrow gauge Kangra Valley line from Pathankot to Joginder Nagar but is miles and miles from Dalhousie. Take a bus from Pathankot I'm afraid!! Takes about 3 hours and there are 10 or so a day.