Kimmo Kalliola knows the feeling that thousands of Finns have been dealing with over the last couple of years. He spent more than a decade working on geolocation positioning at Nokia, a highly technical job, but the Finnish tech giant hit hard times. In late 2012, Mr. Kalliola and 10,000 others at the company were laid off.

“I remember those sleepless nights,” said Mr. Kalliola, 42, who holds a Ph.D. in radio engineering.

Troubles at Nokia, once a source of national pride for Finns, have hardly slowed. Last year, the company sold its once-dominant mobile phone business to Microsoft. Within three months, Microsoft announced 18,000 layoffs, many of them in Finland. Further job cuts are now underway; Microsoft said it would reduce its Finnish work force by up to 2,300 employees, or roughly two-thirds of its local work force. Nokia now focuses almost entirely on its telecom infrastructure business.

This fast influx of unemployed tech workers like Mr. Kalliola into the Finnish economy has left policy makers with a headache — one that many of their counterparts elsewhere would most likely welcome.

With the skyrocketing growth of smartphones, apps and the mobile Internet, governments worldwide are angling to train and attract more highly skilled developers and engineers to meet the needs of their quickly digitizing economies. British politicians are investing heavily in computer training for teenagers, French policy makers are pushing coding as a potential solution to the country’s economic problems, and many Americans are rebooting their careers to tap into the growing number of tech-based jobs.