Since you pass is only valid within Switzerland you will need an additional ticket for the Italian part. So you will need to buy a ticket Chiasso - Milano. However you do not need to change trains in Milano, you can stay on the train.
So easiest for you is to first look up the schedule you want to travel, then look at the train details, and note when the train will stop in Chiasso, and what the train number is, then book Chiasso - Milano on that train on www.trenitalia.com